Opened 5 weeks ago
Last modified 4 weeks ago
#66271 new defect (bug)
Make sure aria-disabled buttons use a consistent focus style
| Reported by: | afercia | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | accessibility |
Description
Splitting this out from #66038.
See comment at https://github.com/WordPress/wordpress-develop/pull/13390/#issuecomment-6061122370
Now that Core is going to use more and more the pattern already used on Gutenberg where disabled controls use aria-disabled="true" instead of a disabled attribute, the styles that come from buttons.css, colors.css, and potentially other stylesheets should be adapted to ensure the aria-disabled buttons get a consistent focus style.
Reminder: using aria-disabled="true":
- Helps making controle discoverable, for better general usability.
- Helps preventing focus losses when controls are disabled, as they are still focusable.
Change History (1)
This ticket was mentioned in PR #14158 on WordPress/wordpress-develop by @nhrrob.
4 weeks ago
#1
- Keywords has-patch added
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Restores the focus ring on
aria-disabled="true"buttons that also have the.disabledclass, which currently removes it viabox-shadow: none !important.Testing instructions
<div class="wp-core-ui"><button type="button" class="button button-primary disabled" aria-disabled="true">Primary</button> <button type="button" class="button disabled" aria-disabled="true">Secondary</button></div>Use of AI Tools
AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Drafting the CSS change and verifying it with Playwright; reviewed and tested by me.