[wp-trac] [WordPress Trac] #47069: Twenty Nineteen: the admin bar on the front end has reduced functionalities and bugs due to jQuery not being used
WordPress Trac
noreply at wordpress.org
Wed Sep 11 00:25:14 UTC 2019
#47069: Twenty Nineteen: the admin bar on the front end has reduced functionalities
and bugs due to jQuery not being used
-------------------------------------+-------------------------------------
Reporter: afercia | Owner: audrasjb
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.3
Component: Toolbar | Version: 5.0
Severity: normal | Resolution:
Keywords: has-screenshots has- | Focuses: accessibility,
patch | javascript
-------------------------------------+-------------------------------------
Comment (by westonruter):
Instead of using hoverintent to cause the dropdown to appear, a pure CSS
alternative to this would be `:focus-within`: https://caniuse.com/#feat
=css-focus-within
In the AMP plugin this is used to make the admin bar's submenus keyboard
accessible: https://github.com/ampproject/amp-
wp/blame/1.2.2/assets/css/src/admin-bar.css (instances of `.hover` were
replaced with `:focus-within`)
The only apparent downside to this is the submenu appears immediately upon
tabbing to the element, as opposed to hovering for a bit or hitting enter
(which IMO is harder to discover/use?). But, it works when JS is turned
off or the JS failed to load.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47069#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list