Button component: aria-disabled focusable button should use consistent focus style #62278
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Discovered while working on #62267
Buttons can be made
aria-disabled
to still be focusable and this pattern has been recently made more solid in #62080When
aria-disabled
buttons receive focus, their focus style should be consistent and this should be managed in the Button component itself. Instead, I observed that sometimes somearia-disabled
buttons use a custom focus style.An important note for accessibility is that:
aria-disabled
buttons still focusable is to make them discoverable and perceivable when they receive focus. This should apply also to the focus style so that I'd argue the focus style should meet the contrast requirement. Feedback and thoughts welcome Cc @joedolsonThe current situation of the focus style for
aria-disabled
buttons is pretty inconsistent and should be improved.1
The Default button uses some opacity so that both the text and the focus outline are lighter:
2
The Primary button only makes the text lighter. The outline (a box-shadow actually) is different:
3
The Secondary button only makes the text color lighter. Anyways, the text color is different from the one of the Default button (which uses opacity):
4
Same for the Tertiary button:
Step-by-step reproduction instructions
__experimentalIsFocusable
anddisabled
props totrue
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: