Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Commit

Permalink
[a11y] Applies disabled to stepper items that cannot be selected so t…
Browse files Browse the repository at this point in the history
…hey cannot be tabbed to. Items that are tabbable will leverage existing styling when focused.

PiperOrigin-RevId: 221189533
  • Loading branch information
Googler authored and nshahan committed Nov 15, 2018
1 parent 7ce8b13 commit 0b2ab83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
[class.can-select]="step.isSelectable"
attr.active="{{step.active}}"
attr.selectable="{{step.isSelectable}}"
[disabled]="step.isNotSelectable"
buttonDecorator
(trigger)="jumpStep(step.index)">
<!-- Step number in circle -->
Expand Down
21 changes: 8 additions & 13 deletions angular_components/lib/material_stepper/material_stepper.scss
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ $edit-icon-size: $mat-grid * 2;
outline-width: 0;
position: relative;

&[selectable = true]:focus {
background-color: $mat-grey-200;

.edit-icon {
color: $mat-grey-700;
}
}

&[orientation = horizontal] {
display: flex;
flex-direction: row;
Expand All @@ -118,19 +126,6 @@ $edit-icon-size: $mat-grid * 2;
&[orientation = vertical] {
padding-bottom: $mini-spacing;
width: auto;

&[active = false] {

&[selectable = true] {
&:hover {
background-color: $mat-grey-200;
}

&:hover .edit-icon {
color: $mat-grey-700;
}
}
}
}
}

Expand Down

0 comments on commit 0b2ab83

Please sign in to comment.