Skip to content

Commit c3a664b

Browse files
arthurbalduiniDungTiger
authored andcommitted
[docs] Create Pickers accessibility page (mui#13274)
1 parent f812167 commit c3a664b

File tree

5 files changed

+93
-6
lines changed

5 files changed

+93
-6
lines changed

docs/data/data-grid/accessibility/accessibility.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Guidelines
66

7-
The most commonly encountered conformance guidelines for accessibility are:
7+
Common conformance guidelines for accessibility include:
88

99
- Globally accepted standard: [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/)
1010
- US:
@@ -13,8 +13,7 @@ The most commonly encountered conformance guidelines for accessibility are:
1313
- Europe: [EAA](https://ec.europa.eu/social/main.jsp?catId=1202) (European Accessibility Act)
1414

1515
WCAG 2.1 has three levels of conformance: A, AA, and AAA.
16-
Level AA meets the most commonly encountered conformance guidelines.
17-
This is the most common target for organizations so what we aims to support very well.
16+
Level AA exceeds the basic criteria for accessibility and is a common target for most organizations, so this is what we aim to support.
1817

1918
The [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/grid/) provide valuable information on how to optimize the accessibility of a data grid.
2019

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
productId: x-date-pickers
3+
title: Date and Time Pickers - Accessibility
4+
githubLabel: 'component: pickers'
5+
packageName: '@mui/x-date-pickers'
6+
---
7+
8+
# Accessibility
9+
10+
<p class="description">The Date and Time Pickers have complete accessibility support, including built-in keyboard navigation that follows international standards.</p>
11+
12+
## Guidelines
13+
14+
Common conformance guidelines for accessibility include:
15+
16+
- Globally accepted standard: [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/)
17+
- US:
18+
- [ADA](https://www.ada.gov/) - US Department of Justice
19+
- [Section 508](https://www.section508.gov/) - US federal agencies
20+
- Europe: [EAA](https://ec.europa.eu/social/main.jsp?catId=1202) (European Accessibility Act)
21+
22+
WCAG 2.1 has three levels of conformance: A, AA, and AAA.
23+
Level AA exceeds the basic criteria for accessibility and is a common target for most organizations, so this is what we aim to support.
24+
25+
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.
26+
27+
## Screen reader compatibility
28+
29+
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.
30+
31+
## Keyboard support
32+
33+
The Date and Time Pickers consist of different associations of Field, Calendar, and Clock components.
34+
Each of these components is designed to respond intuitively to keyboard interactions, providing extensive keyboard navigation support.
35+
36+
### Fields
37+
38+
The following table describes the keyboard support for all [field components](/x/react-date-pickers/fields/):
39+
40+
| Keys | Description |
41+
| --------------------------------------------------------------------: | :------------------------------------------- |
42+
| <kbd class="key">Arrow Left</kbd>, <kbd class="key">Arrow Right</kbd> | Moves focus among date/time sections |
43+
| <kbd class="key">Arrow Up</kbd> | Increases focused section value by 1 |
44+
| <kbd class="key">Arrow Down</kbd> | Decreases focused section value section by 1 |
45+
| <kbd class="key">Page Up</kbd> | Increases focused section value section by 5 |
46+
| <kbd class="key">Page Down</kbd> | Decreases focused section value section by 5 |
47+
| <kbd class="key">Home</kbd> | Sets focused section to the minimal value |
48+
| <kbd class="key">End</kbd> | Sets focused section to the maximal value |
49+
50+
### Date Calendar
51+
52+
Among the [available view components](https://mui.com/x/react-date-pickers/date-calendar/#views), `day` is the only one that implements specific keyboard support:
53+
54+
| Keys | Description |
55+
| -------------------------------: | :-------------------------------------------------------------- |
56+
| <kbd class="key">Page Up</kbd> | Moves calendar to next month, keeping focus on the same day |
57+
| <kbd class="key">Page Down</kbd> | Moves calendar to previous month, keeping focus on the same day |
58+
| <kbd class="key">Home</kbd> | Moves focus to the first day of the week |
59+
| <kbd class="key">End</kbd> | Moves focus to the last day of the week |
60+
61+
### Date Picker
62+
63+
The [Date Picker](/x/react-date-pickers/date-picker/) combines the functionalities of the Date Field and Date Calendar components.
64+
65+
Depending on which component is in focus, the Picker will provide the corresponding keyboard support, either from [Date Field](/x/react-date-pickers/accessibility/#fields) or [Date Calendar](/x/react-date-pickers/accessibility/#date-calendar).
66+
67+
### Date Range Calendar
68+
69+
The [Date Range Calendar](/x/react-date-pickers/date-range-calendar/) implements a similar keyboard support as the day view of the [Date Calendar](/x/react-date-pickers/accessibility/#date-calendar) component, with a difference on the navigation among the previous and next months that must be achieved using the arrows in the calendar header.
70+
71+
| Keys | Description |
72+
| --------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------ |
73+
| <kbd class="key">Arrow Up</kbd>, <kbd class="key">Arrow Down</kbd>,<br> <kbd class="key">Arrow Left</kbd>, <kbd class="key">Arrow Right</kbd> | Moves focus among the available values |
74+
| <kbd class="key">Page Up</kbd> | Moves focus to the last day of the month |
75+
| <kbd class="key">Page Down</kbd> | Moves focus to the first day of the month |
76+
| <kbd class="key">Home</kbd> | Moves focus to first day of the week within the current month |
77+
| <kbd class="key">End</kbd> | Moves focus to last day of the week within the current month |
78+
79+
### Date Range Picker
80+
81+
When interacting with the keyboard, the [Date Range Picker](/x/react-date-pickers/date-range-picker/) keeps the focus on the Field component, thereby offering the same keyboard navigation support as the [Date Range Field](/x/react-date-pickers/accessibility/#fields), having the changes consistently updated on the calendar component.

docs/data/pages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ const pages: MuiPage[] = [
229229
{ pathname: '/x/react-date-pickers', title: 'Overview' },
230230
{ pathname: '/x/react-date-pickers/getting-started' },
231231
{ pathname: '/x/react-date-pickers/base-concepts' },
232+
{ pathname: '/x/react-date-pickers/accessibility' },
232233
{ pathname: '/x/react-date-pickers/faq', title: 'FAQ' },
233234
{
234235
pathname: '/x/react-date-pickers-components',

docs/data/tree-view/accessibility/accessibility.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ packageName: '@mui/x-tree-view'
1212

1313
## Guidelines
1414

15-
The most commonly encountered conformance guidelines for accessibility are:
15+
Common conformance guidelines for accessibility include:
1616

1717
- Globally accepted standard: [WCAG](https://www.w3.org/WAI/standards-guidelines/wcag/)
1818
- US:
@@ -21,8 +21,7 @@ The most commonly encountered conformance guidelines for accessibility are:
2121
- Europe: [EAA](https://ec.europa.eu/social/main.jsp?catId=1202) (European Accessibility Act)
2222

2323
WCAG 2.1 has three levels of conformance: A, AA, and AAA.
24-
Level AA meets the most commonly encountered conformance guidelines.
25-
This is the most common target for organizations, so we aim to support it very well.
24+
Level AA exceeds the basic criteria for accessibility and is a common target for most organizations, so this is what we aim to support.
2625

2726
The [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/treeview/) provide valuable information on how to optimize the accessibility of a Tree View.
2827

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as React from 'react';
2+
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
3+
import * as pageProps from 'docsx/data/date-pickers/accessibility/accessibility.md?muiMarkdown';
4+
5+
export default function Page() {
6+
return <MarkdownDocs {...pageProps} />;
7+
}

0 commit comments

Comments
 (0)