Skip to content

Commit

Permalink
chore(format): fix format error
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Oct 28, 2022
1 parent 90b80e9 commit b5fc65f
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions src/pages/components/pagination/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,53 +41,69 @@ other accessibility considerations, some of which are described below.

### Keyboard interaction

The tab order goes from left to right through the controls in the pagination component. On focus, the dropdowns are opened with `Space` or with up or down arrows, which also cycle through the values. Both `Space` and `Enter` select a value and close the dropdown. The dropdown can also be closed by pressing `Esc`. The previous and next page arrow buttons are activated by `Space` or `Enter` keys.
The tab order goes from left to right through the controls in the pagination
component. On focus, the dropdowns are opened with `Space` or with up or down
arrows, which also cycle through the values. Both `Space` and `Enter` select a
value and close the dropdown. The dropdown can also be closed by pressing `Esc`.
The previous and next page arrow buttons are activated by `Space` or `Enter`
keys.

<Row>
<Column colLg={8}>

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

<Caption>
Interactive elements in pagination maintain their usual Carbon keyboard behaviors and tab order.
Interactive elements in pagination maintain their usual Carbon keyboard
behaviors and tab order.
</Caption>

</Column>
</Row>

When the pagination is at either end of its range, one of the page navigation buttons becomes invalid. When that happens, the button is no longer navigable or operable, like any other disabled control.
When the pagination is at either end of its range, one of the page navigation
buttons becomes invalid. When that happens, the button is no longer navigable or
operable, like any other disabled control.

<Row>
<Column colLg={8}>

![tab order bypasses the disabled left-arrow icon](images/pagination-accessibility-2.png)

<Caption>
The prior page button is disabled and unreachable when the pagination is at the start of its range.
The prior page button is disabled and unreachable when the pagination is at
the start of its range.
</Caption>

</Column>
</Row>

### Labeling

Not all the elements in pagination have static or visually isolated labels. Carbon constructs a programmatic name for the second dropdown by concatenating some dynamically generated text on the screen. Carbon also provides accessible names for the icon-only buttons.
Not all the elements in pagination have static or visually isolated labels.
Carbon constructs a programmatic name for the second dropdown by concatenating
some dynamically generated text on the screen. Carbon also provides accessible
names for the icon-only buttons.

<Row>
<Column colLg={8}>

![illustration showing labels for dropdown and icon-only buttons](images/pagination-accessibility-3.png)

<Caption>
Carbon provides the accessible names "page number, of 3 pages", "previous page", and "next page" for assistive technology.
Carbon provides the accessible names "page number, of 3 pages", "previous
page", and "next page" for assistive technology.
</Caption>

</Column>
</Row>

## Development considerations

Keep these considerations in mind if you are modifying Carbon or creating a custom component.
Keep these considerations in mind if you are modifying Carbon or creating a
custom component.

- Carbon uses `<select>` elements for the dropdowns
- Consult the [ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html) for more considerations.
- Consult the
[ARIA authoring practices](https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html)
for more considerations.

0 comments on commit b5fc65f

Please sign in to comment.