Skip to content

Commit 4ca6784

Browse files
committed
docs(material/stepper): updates docs to use new aria roles
Updates previous documentation so it uses the correct/updated aria roles of , , and with the attribute.
1 parent 0cb3320 commit 4ca6784

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/cdk/stepper/stepper.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ resetting it will call `reset` on the underlying form control which clears the v
5959

6060
### Accessibility
6161
Apart from the built-in keyboard support, the stepper doesn't apply any treatment. When implementing
62-
your own component, it is recommended that the stepper is treated as a tabbed view for accessibility
63-
purposes by giving it a `role="tablist"`. The header of step that can be clicked to select the step
64-
should be given `role="tab"`, and the content that can be expanded upon selection should be given
65-
`role="tabpanel"`. Furthermore, the step header should have an `aria-selected` attribute that
66-
reflects its selected state.
62+
your own component, it is recommended that the stepper is treated as a grouped view for accessibility
63+
purposes by giving it a `role="group"`. The header of step that can be clicked to select the step
64+
should be given `role="button"`, and the content that can be expanded upon selection should be given
65+
`role="region"`. Furthermore, the step header should have an `aria-expanded` attribute that
66+
reflects its expanded state.
6767

6868
You can refer to the [Angular Material stepper](https://github.com/angular/components/tree/main/src/material/stepper) as an example of an accessible implementation.

src/material/stepper/stepper.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,10 @@ export class MyApp {}
228228
<!-- example(stepper-intl) -->
229229

230230
### Accessibility
231-
The stepper is treated as a tabbed view for accessibility purposes, so it is given
232-
`role="tablist"` by default. The header of step that can be clicked to select the step
233-
is given `role="tab"`, and the content that can be expanded upon selection is given
234-
`role="tabpanel"`. `aria-selected` attribute of step header is automatically set based on
231+
The stepper is treated as a grouped view for general accessibility purposes, so it is given
232+
`role="group"` by default. The header of step that can be clicked to select the step
233+
is given `role="button"`, and the content that can be expanded upon selection is given
234+
`role="region"`. `aria-expanded` attribute of step header is automatically set based on
235235
step selection change.
236236

237237
The stepper and each step should be given a meaningful label via `aria-label` or `aria-labelledby`.

0 commit comments

Comments
 (0)