[wp-trac] [WordPress Trac] #50516: Use ARIA button class on plugin and theme auto-updates action links
WordPress Trac
noreply at wordpress.org
Thu Jul 9 15:56:07 UTC 2020
#50516: Use ARIA button class on plugin and theme auto-updates action links
------------------------------+----------------------------
Reporter: audrasjb | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 5.5
Component: Upgrade/Install | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: accessibility
------------------------------+----------------------------
Changes (by afercia):
* keywords: has-patch needs-refresh => has-patch commit
Comment:
[attachment:"50516.2.diff"] makes all the auto-updates toggle controls be
perceived and behave like buttons. Also:
1. `wp_theme_auto_update_setting_template()` is only used for the `tmpl-
theme-single` JS template. This means that with JS off, this template
won't be rendered. All the links with a `href` attribute for no-JS support
used here are a bit pointless. These can be button elements.
2. Adds `keyup` and `keydown` events to make these controls behave like
buttons: activated when the Spacebar is released and preventing the page
from scrolling when the Spacebar is pressed.
3. Avoids to update the `href` attribute when the controls are buttons
(which don't have a `href`).
4. Avods to target elements based on their type: since the markup may
change at any time, it's better to not use element selectors.
5. Changes a `speak` message from "Enable auto-updates" to "Auto-updates
enabled".
6. Removes the `polite` argument from the `wp.a11y.speak()` calls, as
`polite` is the default value .
7. Minor CSS improvements.
8. Minor JS coding standards.
Some testing would be nice :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50516#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list