Skip to content

Commit 82d8bff

Browse files
docs: update a11y tab with pagination nav variant (carbon-design-system#4206)
* update a11y.mdx * update a11y.mdx * create new a11y.mdx * remove changes --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
1 parent ad0902e commit 82d8bff

File tree

9 files changed

+69
-7
lines changed

9 files changed

+69
-7
lines changed

src/pages/components/pagination/accessibility.mdx

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@ other accessibility considerations, some of which are described below.
4444

4545
### Keyboard interaction
4646

47+
#### Pagination
48+
4749
The tab order goes from left to right through the controls in the pagination
48-
component. On focus, the dropdowns are opened with `Space` or with up or down
50+
variant. On focus, the dropdowns are opened with `Space` or with up or down
4951
arrows, which also cycle through the values. Both `Space` and `Enter` select a
5052
value and close the dropdown. The dropdown can also be closed by pressing `Esc`.
5153
The previous and next page arrow buttons are activated by `Space` or `Enter`
5254
keys.
5355

5456
<Row>
55-
<Column colLg={8}>
57+
<Column colLg={12}>
5658

5759
![example of tabbing into a pagination group and arrowing between selections](images/pagination-a11y-1.png)
5860

@@ -81,21 +83,81 @@ operable, like any other disabled control.
8183
</Column>
8284
</Row>
8385

86+
#### Pagination nav
87+
88+
The tab order goes left to right through the button controls in the pagination
89+
nav variant. When page buttons have focus, both `Space` and `Enter` activates
90+
the page button and change the current page to the button that currently has
91+
selection. When the previous and next page arrow buttons have focus, both
92+
`Space` and `Enter` activates them.
93+
94+
<Row>
95+
<Column colLg={12}>
96+
97+
![Interactive elements in pagination nav maintain their usual Carbon keyboard behaviors and tab order.](images/pagination-a11y-3.png)
98+
99+
<Caption>
100+
Interactive elements in pagination nav maintain their usual Carbon keyboard
101+
behaviors and tab order.
102+
</Caption>
103+
104+
</Column>
105+
</Row>
106+
107+
If an overflow ellipsis is present in the pagination nav, once focused, pressing
108+
Space activates the menu to choose an available page to navigate to. Enter or
109+
Tab selects a value from the menu and closes it. The menu can also be closed by
110+
pressing Esc.
111+
112+
<Row>
113+
<Column colLg={12}>
114+
115+
![The menu opens by pressing Space and pressing Tab or Enter selects a page from the menu and closes it.](images/pagination-a11y-4.png)
116+
117+
<Caption>
118+
The menu opens by pressing Space and pressing Tab or Enter selects a page from
119+
the menu and closes it.
120+
</Caption>
121+
122+
</Column>
123+
</Row>
124+
84125
### Labeling
85126

127+
#### Pagination
128+
86129
Not all the elements in pagination have static or visually isolated labels.
87130
Carbon constructs a programmatic name for the second dropdown by concatenating
88-
some dynamically generated text on the screen. Carbon also provides accessible
89-
names for the icon-only buttons.
131+
dynamically generated text on the screen. Carbon also provides accessible names
132+
for the icon-only buttons.
133+
134+
<Row>
135+
<Column colLg={8}>
136+
137+
![illustration showing labels for dropdown and icon-only buttons](images/pagination-a11y-5.png)
138+
139+
<Caption>
140+
Carbon provides the accessible names "page number, of 40 pages", "previous",
141+
and "next" for assistive technology.
142+
</Caption>
143+
144+
</Column>
145+
</Row>
146+
147+
#### Pagination nav
148+
149+
Carbon constructs a programmatic name for the page ghost buttons by
150+
concatenating dynamically generated text on the screen. Carbon also provides
151+
accessible names for the icon-only buttons.
90152

91153
<Row>
92154
<Column colLg={8}>
93155

94-
![illustration showing labels for dropdown and icon-only buttons](images/pagination-a11y-3.png)
156+
![Carbon provides the accessible names "page", "previous", and "next" for assistive technology.](images/pagination-a11y-6.png)
95157

96158
<Caption>
97-
Carbon provides the accessible names "page number, of 40 pages", "previous
98-
page", and "next page" for assistive technology.
159+
Carbon provides the accessible names "page", "previous", and "next" for
160+
assistive technology.
99161
</Caption>
100162

101163
</Column>
Loading
Loading
Loading
Loading
Loading
Loading
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)