Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: revise a11y images and content #3244

Merged
merged 7 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/pages/components/UI-shell-left-panel/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ tab out of the left panel, the side rail slides out of view.
Keep these considerations in mind if you are modifying Carbon or creating a
custom component.

- the left panel is in a `<nav>` section with `aria-label="Side navigation"`
- all items in the left panel are in a nested `<ul>` structure, which provides
additional information to assistive technologies
- each 'sub-menu' is implemented as a `<button>` with `aria-expanded`
- activated links receive an `aria-current="page"` attribute
- The left panel is in a `<nav>` section with `aria-label="Side navigation"`.
- All items in the left panel are in a nested `<ul>` structure, which provides
additional information to assistive technologies.
- Each 'sub-menu' is implemented as a `<button>` with `aria-expanded`.
- Activated links receive an `aria-current="page"` attribute.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions src/pages/components/UI-shell-right-panel/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ button (with `Space` or `Enter`) opens the right panel over the main content
area. All actionable links in the panel can be reached by `Tab`. Activating any
of the links (with `Enter`) loads new content and closes the right panel. The
panel can also be closed by pressing `Esc` or by re-activating the switcher
button (which received an X icon on activation).
button (which receives an X icon on activation).

<Row>
<Column colLg={8}>

![example of right panel keyboard activation](images/right-panel-accessibility-1.png)
![example of right panel keyboard activation](images/right-panel-a11y-1.png)

<Caption>
Activating the switch button with Enter or Space toggles the display of the
Expand All @@ -64,7 +64,7 @@ button (which received an X icon on activation).
<Row>
<Column colLg={8}>

![example of right panel keyboard interaction](images/right-panel-accessibility-2.png)
![example of right panel keyboard interaction](images/right-panel-a11y-2.png)

<Caption>
Links are reached by Tab and activated by Enter key. Activating links or
Expand All @@ -76,16 +76,16 @@ button (which received an X icon on activation).

## Design recommendations

### Annotate name for switcher button, where necessary
### Annotating the switcher button name

Designers may need to change the icon-only switcher button's name to match the
right panel's scope. Depending on the context of the design, common button names
include "Switch site" or "App switcher".
When necessary, designers may need to change the icon-only switcher button's
name to match the right panel's scope. Depending on the context of the design,
common button names include "Switch site" or "App switcher".

<Row>
<Column colLg={8}>

![the switcher button is annotated as "app switcher"](images/right-panel-accessibility-3.png)
![the switcher button is annotated as "app switcher"](images/right-panel-a11y-3.png)

<Caption>
Annotate a name change to the switcher button if needed in your design.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified src/pages/components/button/images/button-accessibility-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions src/pages/components/pagination/accessibility.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

<PageDescription>

No accessibility annotations are needed for paginations, but keep these
No accessibility annotations are needed for pagination, but keep these
considerations in mind if you are modifying Carbon or creating a custom
component.

Expand Down Expand Up @@ -51,7 +51,7 @@ keys.
<Row>
<Column colLg={8}>

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

<Caption>
Interactive elements in pagination maintain their usual Carbon keyboard
Expand All @@ -68,7 +68,7 @@ operable, like any other disabled control.
<Row>
<Column colLg={8}>

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

<Caption>
The prior page button is disabled and unreachable when the pagination is at
Expand All @@ -88,10 +88,10 @@ names for the icon-only buttons.
<Row>
<Column colLg={8}>

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

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

Expand All @@ -103,7 +103,7 @@ names for the icon-only buttons.
Keep these considerations in mind if you are modifying Carbon or creating a
custom component.

- Carbon uses `<select>` elements for the dropdowns
- 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.