Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cdk/stepper/step-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {FocusableOption} from '../a11y';
@Directive({
selector: '[cdkStepHeader]',
host: {
'role': 'tab',
'role': 'button',
},
})
export class CdkStepHeader implements FocusableOption {
Expand Down
2 changes: 1 addition & 1 deletion src/material/stepper/step-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/privat
'class': 'mat-step-header',
'[class.mat-step-header-empty-label]': '_hasEmptyLabel()',
'[class]': '"mat-" + (color || "primary")',
'role': 'tab',
'role': 'button',
},
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
44 changes: 23 additions & 21 deletions src/material/stepper/stepper.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@switch (orientation) {
@case ('horizontal') {
<div class="mat-horizontal-stepper-wrapper">
<div class="mat-horizontal-stepper-wrapper" role="group">
<div class="mat-horizontal-stepper-header-container">
@for (step of steps; track step) {
<ng-container
Expand All @@ -27,7 +27,7 @@
<div
#animatedContainer
class="mat-horizontal-stepper-content"
role="tabpanel"
role="region"
[id]="_getStepContentId($index)"
[attr.aria-labelledby]="_getStepLabelId($index)"
[class]="'mat-horizontal-stepper-content-' + _getAnimationDirection($index)"
Expand All @@ -40,28 +40,30 @@
}

@case ('vertical') {
@for (step of steps; track step) {
<div class="mat-step">
<ng-container
[ngTemplateOutlet]="stepTemplate"
[ngTemplateOutletContext]="{step}"/>
<div
#animatedContainer
class="mat-vertical-content-container"
[class.mat-stepper-vertical-line]="!$last"
[class.mat-vertical-content-container-active]="selectedIndex === $index"
[attr.inert]="selectedIndex === $index ? null : ''">
<div class="mat-vertical-stepper-content"
role="tabpanel"
[id]="_getStepContentId($index)"
[attr.aria-labelledby]="_getStepLabelId($index)">
<div class="mat-vertical-content">
<ng-container [ngTemplateOutlet]="step.content"/>
<div class="mat-vertical-stepper-wrapper" role="group">
@for (step of steps; track step) {
<div class="mat-step">
<ng-container
[ngTemplateOutlet]="stepTemplate"
[ngTemplateOutletContext]="{step}"/>
<div
#animatedContainer
class="mat-vertical-content-container"
[class.mat-stepper-vertical-line]="!$last"
[class.mat-vertical-content-container-active]="selectedIndex === $index"
[attr.inert]="selectedIndex === $index ? null : ''">
<div class="mat-vertical-stepper-content"
role="region"
[id]="_getStepContentId($index)"
[attr.aria-labelledby]="_getStepLabelId($index)">
<div class="mat-vertical-content">
<ng-container [ngTemplateOutlet]="step.content"/>
</div>
</div>
</div>
</div>
</div>
}
}
</div>
}
}

Expand Down
1 change: 0 additions & 1 deletion src/material/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ export class MatStep extends CdkStep implements ErrorStateMatcher, AfterContentI
'[class.mat-stepper-animating]': '_isAnimating()',
'[style.--mat-stepper-animation-duration]': '_getAnimationDuration()',
'[attr.aria-orientation]': 'orientation',
'role': 'tablist',
},
providers: [{provide: CdkStepper, useExisting: MatStepper}],
encapsulation: ViewEncapsulation.None,
Expand Down
Loading