Skip to content
Merged
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/material/button/_button-base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
}

&:focus > .mat-focus-indicator::before {
&:focus-visible > .mat-focus-indicator::before {
content: '';

@if ($focus-indicator-inherits-shape) {
Expand Down
2 changes: 1 addition & 1 deletion src/material/checkbox/checkbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ $fallbacks: m3-checkbox.get-tokens();

// For checkboxes render the focus indicator when we know
// the hidden input is focused (slightly different for each control).
.mdc-checkbox__native-control:focus ~ .mat-focus-indicator::before {
.mdc-checkbox__native-control:focus-visible ~ .mat-focus-indicator::before {
content: '';
}
2 changes: 1 addition & 1 deletion src/material/chips/chip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ $fallbacks: m3-chip.get-tokens();

// The chip has multiple focus targets so we have to put the indicator on
// a separate element, rather than on the focusable element itself.
.mat-mdc-chip-action:focus .mat-focus-indicator::before {
.mat-mdc-chip-action:focus-visible .mat-focus-indicator::before {
content: '';
}

Expand Down
2 changes: 1 addition & 1 deletion src/material/core/focus-indicators/_private.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $default-border-radius: 4px;

// By default, render the focus indicator when the focus indicator host element takes focus.
// Defining a pseudo element's content will cause it to render.
&:focus::before {
&:focus-visible::before {
content: '';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/material/datepicker/calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ $fallbacks: m3-datepicker.get-tokens();

// For calendar cells, render the focus indicator when the parent cell is
// focused.
.mat-calendar-body-cell:focus .mat-focus-indicator::before {
.mat-calendar-body-cell:focus-visible .mat-focus-indicator::before {
content: '';
}

2 changes: 1 addition & 1 deletion src/material/list/list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ a.mdc-list-item--activated {

// For list items, render the focus indicator when the parent
// listem item is focused.
&:focus > .mat-focus-indicator::before {
&:focus-visible > .mat-focus-indicator::before {
content: '';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/material/stepper/step-header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $fallbacks: m3-stepper.get-tokens();

// Stepper headers have the focus indicator as a descendant,
// because `::before` is used for other styling.
&:focus .mat-focus-indicator::before {
&:focus-visible .mat-focus-indicator::before {
content: '';
}

Expand Down
Loading