Skip to content

Commit 46a9af7

Browse files
arthurbalduiniDungTiger
authored andcommitted
[docs] Move Pickers dialog guidelines to accessibility page (mui#13778)
1 parent 0bcd27f commit 46a9af7

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

docs/data/date-pickers/accessibility/accessibility.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ Level AA exceeds the basic criteria for accessibility and is a common target for
2424

2525
The WAI-ARIA Authoring Practices includes examples on [Date Picker Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/) and [Date Picker Spin Button](https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton/examples/datepicker-spinbuttons/) patterns, which provide valuable information on how to optimize the accessibility of these components.
2626

27+
### Dialog considerations
28+
29+
Both `Desktop` and `Mobile` Date and Time Pickers are using `role="dialog"` to display their interactive view parts and thus they should follow [Modal accessibility guidelines](/material-ui/react-modal/#accessibility).
30+
This behavior is automated as much as possible, ensuring that the Date and Time Pickers are accessible in most cases.
31+
A correct `aria-labelledby` value is assigned to the dialog component based on the following rules:
32+
33+
- Use `toolbar` id if the toolbar is visible;
34+
- Use the id of the input label if the toolbar is hidden;
35+
36+
:::info
37+
Make sure to provide an `aria-labelledby` prop to `popper` and/or `mobilePaper` slots in case you are using Date and Time Pickers component with **hidden toolbar** and **without a label**.
38+
:::
39+
2740
## Screen reader compatibility
2841

2942
Date and Time Pickers use ARIA roles and robust focus management across the interactive elements to convey the necessary information to users, being optimized for use with assistive technologies.

docs/data/date-pickers/base-concepts/base-concepts.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -102,19 +102,6 @@ For example, in a Time Picker, it allows you to choose the date of your value:
102102

103103
{{"demo": "ReferenceDateExplicitTimePicker.js"}}
104104

105-
## Accessibility
106-
107-
Both `Desktop` and `Mobile` Date and Time Pickers are using `role="dialog"` to display their interactive view parts and thus they should follow [Modal accessibility guidelines](/material-ui/react-modal/#accessibility).
108-
This behavior is automated as much as possible, ensuring that the Date and Time Pickers are accessible in most cases.
109-
A correct `aria-labelledby` value is assigned to the dialog component based on the following rules:
110-
111-
- Use `toolbar` id if the toolbar is visible;
112-
- Use the id of the input label if the toolbar is hidden;
113-
114-
:::info
115-
Make sure to provide an `aria-labelledby` prop to `popper` and/or `mobilePaper` `slotProps` in case you are using Date and Time Pickers component with **hidden toolbar** and **without a label**.
116-
:::
117-
118105
## TypeScript
119106

120107
### Theme augmentation

0 commit comments

Comments
 (0)