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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

### Bug Fixes

- `Button`: Suppress the browser focus ring when keyboard-focused and pressed ([#81113](https://github.com/WordPress/gutenberg/pull/81113)).
- `ToolsPanel`: Migrate styles from Emotion to an SCSS Module and restore the header heading typography after the `View` migration. ([#80445](https://github.com/WordPress/gutenberg/pull/80445)).
- `Autocomplete`: Expose the suggestions list to assistive technology with `aria-controls` and `aria-haspopup`, both required alongside `aria-autocomplete="list"` ([#80403](https://github.com/WordPress/gutenberg/pull/80403)).
- `Autocomplete`: Omit `aria-activedescendant` while no suggestion is highlighted, instead of returning `null` for it ([#80403](https://github.com/WordPress/gutenberg/pull/80403)).
Expand Down
4 changes: 4 additions & 0 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
box-shadow: none;
}

&:focus {
outline: none;
}

&:focus:not(:active) {
@include mixins.outset-ring__focus();
}
Expand Down
1 change: 1 addition & 0 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

### Bug Fixes

- `Button`, `Link`, `Combobox`, `Select`: Suppress the browser focus ring when keyboard-focused and pressed ([#81113](https://github.com/WordPress/gutenberg/pull/81113)).
- Keep overlays in the compat overlay slot available to assistive technologies when used alongside `@wordpress/components` Modal ([#80310](https://github.com/WordPress/gutenberg/pull/80310)).

### Code Quality
Expand Down
12 changes: 10 additions & 2 deletions packages/ui/src/utils/css/focus.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@

@layer utilities {
.outset-ring--focus:focus,
.outset-ring--focus-except-active:focus:not(:active),
.outset-ring--focus-visible:focus-visible,
.outset-ring--focus-within:focus-within,
.outset-ring--focus-within-except-active:focus-within:not(:has(:active)),
.outset-ring--focus-within-visible:focus-within:has(:focus-visible),
:focus-visible .outset-ring--focus-parent-visible {
@include mixins.focus-ring();
}

.outset-ring--focus-except-active:focus,
.outset-ring--focus-within-except-active:focus-within {
outline: none;
}

.outset-ring--focus-except-active:focus:not(:active),
.outset-ring--focus-within-except-active:focus-within:not(:has(:active)) {
@include mixins.focus-ring();
}
}
}
Loading