Open crumbyshirt opened 1 year ago
I looked into this one. Fixing it for a horizontal stepper is straightforward since we just need to move the role
to a different element, but it'll be difficult to fix for a vertical one, because the tabs and tab labels have to be siblings. That being said, I don't think that this affects users.
@crisbeto What do you mean when you say 'move the role to a different element'. You mean on your side when the update is done or ill put it manually.
Heres my html:
<mat-horizontal-stepper linear #stepper labelPosition="bottom" (selectionChange)="onStepChange($event)">
<ng-template matStepperIcon="edit" let-index="index">
{{index + 1}}
</ng-template>
<ng-template matStepperIcon="done" let-index="index">
{{index + 1}}
</ng-template>
<ng-template matStepperIcon="number" let-index="index">
{{index + 1}}
</ng-template>
<mat-step [stepControl]="sample.control" [editable]="!isSaving">
</mat-step>
<mat-step role="tab" [stepControl]="sample.control" [editable]="!isSaving">
</mat-step>
<mat-step role="tab" [stepControl]="sample.control" [editable]="!isSaving">
</mat-step>
<mat-step role="tab" [editable]="!isSaving">
</mat-step>
</mat-horizontal-stepper>
I second what @JimAgwit said. @crisbeto Which element has its role
moved, and to which element is the role
moved to? Thanks in advance.
Is this a regression?
The previous version in which this bug was not present was
No response
Description
The documentation for the stepper appears to indicate that this should not be occurring based on the role for the stepper being a tablist and the roles for steps being tab. I think the problem comes from some interim nodes between the tabs and the tablist.
Reproduction
Steps to reproduce:
Expected Behavior
Running the WCAG2.1 AA compliance scan should not find the "Certain ARIA roles must contain particular children" issue which is considered a critical aria issue.
Actual Behavior
Running the WCAG2.1 AA compliance scan finds the "Certain ARIA roles must contain particular children" issue which is considered a critical aria issue.
There is no clear way to resolve this issue with the stepper component.
Environment