Opened 3 months ago
Last modified 4 weeks ago
#63970 new defect (bug)
Disabled .handle-actions button receives keyboard focus
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | 5.5 |
| Component: | Administration | Keywords: | has-patch |
| Focuses: | accessibility | Cc: |
Description
The dashboard metaboxes have arrow buttons that allow them to be moved up and down with a keyboard. The top-most metabox has a disabled move up button that is not probramatically disabled so it still receives keyboard focus though it is not functional.
Example:
<button type="button" class="handle-order-higher" aria-disabled="true" aria-describedby="dashboard_site_health-handle-order-higher-description"><span class="screen-reader-text">Move up</span><span class="order-higher-indicator" aria-hidden="true"></span></button>
It would be better if the disabled attribute were added to this button or if it had a negative tab index so that it doesn't receive keyboard focus outside of when the focus is already on it (because it was used to move a meta box into the top-most position).
Change History (7)
#2
@
3 months ago
Thanks @alh0319 for reporting the bug!
I can reproduce this problem, starting work on a patch to fix this...
This ticket was mentioned in PR #9915 on WordPress/wordpress-develop by @yashjawale.
3 months ago
#3
- Keywords has-patch added
This PR prevents keyboard focus for dashboard metabox widget arrows which are disabled
Trac ticket: https://core.trac.wordpress.org/ticket/63970
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
3 months ago
#5
@
3 months ago
- Version set to 5.5
Only using aria-disabled was intentional at the time. Making the button disabled just introduces other problems, such as a need to move focus when a meta box is moved into an immovable position and causing buttons to disappear when they are not available, rather than just announcing them as disabled.
See: https://core.trac.wordpress.org/ticket/39074#comment:31
Whether something disabled should be totally unavailable or not is a philosophical point: WordPress has generally made the choice that screen readers should be able to perceive disabled fields, rather than hiding them. But this can be re-discussed, certainly.
This button is also present in the classic editor meta boxes.