Skip to content

Commit

Permalink
Add focus rings to focusable disabled buttons (#56383)
Browse files Browse the repository at this point in the history
Fixes the CSS to only remove borders from disabled secondary/tertiary buttons when they don't have focus
  • Loading branch information
Andrew Hayward committed Nov 22, 2023
1 parent 574f628 commit 2097500
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Enhancements

- `Button`: Add focus rings to focusable disabled buttons ([#56383](https://github.com/WordPress/gutenberg/pull/56383)).

### Experimental

- `Tabs`: Memoize and expose the component context ([#56224](https://github.com/WordPress/gutenberg/pull/56224)).
Expand Down
7 changes: 5 additions & 2 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@
background: transparent;
transform: none;
opacity: 1;
box-shadow: none;
outline: none;

&:not(:focus) {
box-shadow: none;
outline: none;
}
}
}

Expand Down

1 comment on commit 2097500

@github-actions
Copy link

@github-actions github-actions bot commented on 2097500 Nov 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 2097500.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6960627147
📝 Reported issues:

Please sign in to comment.