diff --git a/src/cdk/stepper/step-header.ts b/src/cdk/stepper/step-header.ts index f0709e3f9878..26ebcbbcb0f7 100644 --- a/src/cdk/stepper/step-header.ts +++ b/src/cdk/stepper/step-header.ts @@ -12,7 +12,7 @@ import {FocusableOption} from '../a11y'; @Directive({ selector: '[cdkStepHeader]', host: { - 'role': 'tab', + 'role': 'button', }, }) export class CdkStepHeader implements FocusableOption { diff --git a/src/cdk/stepper/stepper.md b/src/cdk/stepper/stepper.md index 8eee8df85730..6052dbccb8ac 100644 --- a/src/cdk/stepper/stepper.md +++ b/src/cdk/stepper/stepper.md @@ -59,10 +59,10 @@ resetting it will call `reset` on the underlying form control which clears the v ### Accessibility Apart from the built-in keyboard support, the stepper doesn't apply any treatment. When implementing -your own component, it is recommended that the stepper is treated as a tabbed view for accessibility -purposes by giving it a `role="tablist"`. The header of step that can be clicked to select the step -should be given `role="tab"`, and the content that can be expanded upon selection should be given -`role="tabpanel"`. Furthermore, the step header should have an `aria-selected` attribute that -reflects its selected state. +your own component, it is recommended that the stepper is treated as a grouped view for accessibility +purposes by giving it a `role="group"`. The header of step that can be clicked to select the step +should be given `role="button"`, and the content that can be expanded upon selection should be given +`role="region"`. Furthermore, the step header should have an `aria-expanded` attribute that +reflects its expanded state. 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. diff --git a/src/material/stepper/step-header.ts b/src/material/stepper/step-header.ts index c6f1815e0b5e..f2c56ea7d025 100644 --- a/src/material/stepper/step-header.ts +++ b/src/material/stepper/step-header.ts @@ -35,7 +35,7 @@ import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/privat host: { 'class': 'mat-step-header', '[class]': '"mat-" + (color || "primary")', - 'role': 'tab', + 'role': 'button', }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/material/stepper/stepper.html b/src/material/stepper/stepper.html index a75e48522600..ea234279a9b1 100644 --- a/src/material/stepper/stepper.html +++ b/src/material/stepper/stepper.html @@ -10,7 +10,7 @@ @switch (orientation) { @case ('horizontal') { -