Skip to content

Commit eabd3dd

Browse files
committed
fix(material/stepper): update vertical-stepper aria attributes
Updates previous fix to add aria-expanded attribute to vertical stepper to be more descriptive as to when the associated content is open and the respective step is current.
1 parent 7eebc20 commit eabd3dd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/material/stepper/stepper.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
}
6363

6464
@case ('vertical') {
65-
<div class="mat-vertical-stepper-wrapper" role="group">
65+
<div class="mat-vertical-stepper-wrapper" role="region">
6666
@for (step of steps; track step) {
6767
<div class="mat-step" role="group">
6868
<mat-step-header
@@ -72,11 +72,12 @@
7272
(keydown)="_onKeydown($event)"
7373
[tabIndex]="_getFocusIndex() === $index ? 0 : -1"
7474
[id]="_getStepLabelId($index)"
75+
[attr.aria-expanded]="selectedIndex === $index"
76+
[attr.aria-controls]="_getStepContentId($index)"
7577
[attr.aria-current]="selectedIndex == $index"
7678
[attr.aria-label]="step.ariaLabel || null"
7779
[attr.aria-labelledby]="(!step.ariaLabel && step.ariaLabelledby) ? step.ariaLabelledby : null"
7880
[attr.aria-disabled]="_stepIsNavigable($index, step) ? null : true"
79-
[attr.aria-owns]="_getStepContentId($index)"
8081
[index]="$index"
8182
[state]="_getIndicatorType($index, step.state)"
8283
[label]="step.stepLabel || step.label"

0 commit comments

Comments
 (0)