|
10 | 10 |
|
11 | 11 | @switch (orientation) {
|
12 | 12 | @case ('horizontal') {
|
13 |
| - <div class="mat-horizontal-stepper-wrapper"> |
14 |
| - <div class="mat-horizontal-stepper-header-container" role="tablist"> |
| 13 | + <div class="mat-stepper-wrapper" role="group"> |
| 14 | + <div class="mat-horizontal-stepper-header-container"> |
15 | 15 | @for (step of steps; track step) {
|
16 | 16 | <ng-container
|
17 | 17 | [ngTemplateOutlet]="stepTemplate"
|
|
27 | 27 | <div
|
28 | 28 | #animatedContainer
|
29 | 29 | class="mat-horizontal-stepper-content"
|
30 |
| - role="tabpanel" |
| 30 | + role="region" |
31 | 31 | [id]="_getStepContentId($index)"
|
32 | 32 | [attr.aria-labelledby]="_getStepLabelId($index)"
|
33 | 33 | [class]="'mat-horizontal-stepper-content-' + _getAnimationDirection($index)"
|
|
40 | 40 | }
|
41 | 41 |
|
42 | 42 | @case ('vertical') {
|
43 |
| - <div class="mat-vertical-stepper-wrapper" role="group"> |
| 43 | + <div class="mat-stepper-wrapper" role="group"> |
44 | 44 | @for (step of steps; track step) {
|
45 | 45 | <div class="mat-step">
|
46 | 46 | <ng-container
|
|
72 | 72 | <mat-step-header
|
73 | 73 | [class.mat-horizontal-stepper-header]="orientation === 'horizontal'"
|
74 | 74 | [class.mat-vertical-stepper-header]="orientation === 'vertical'"
|
75 |
| - [attr.role]="orientation === 'horizontal'? 'tab' : 'button'" |
| 75 | + role="button" |
76 | 76 | (click)="step.select()"
|
77 | 77 | (keydown)="_onKeydown($event)"
|
78 | 78 | [tabIndex]="_getFocusIndex() === i ? 0 : -1"
|
79 | 79 | [id]="_getStepLabelId(i)"
|
80 |
| - [attr.aria-posinset]="orientation === 'horizontal'? i + 1 : undefined" |
81 |
| - [attr.aria-setsize]="orientation === 'horizontal'? steps.length : undefined" |
82 | 80 | [attr.aria-controls]="_getStepContentId(i)"
|
83 |
| - [attr.aria-selected]="orientation === 'horizontal' ? selectedIndex == i : undefined" |
84 |
| - [attr.aria-expanded]="orientation === 'vertical' ? selectedIndex == i : undefined" |
| 81 | + [attr.aria-expanded]="selectedIndex == i" |
85 | 82 | [attr.aria-label]="step.ariaLabel || null"
|
86 | 83 | [attr.aria-labelledby]="(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null"
|
87 | 84 | [attr.aria-disabled]="_stepIsNavigable(i, step) ? null : true"
|
|
0 commit comments