[wp-trac] [WordPress Trac] #37513: Admin bar sub menu items dashicon and screen readers

WordPress Trac noreply at wordpress.org
Thu Nov 3 19:11:52 UTC 2016


#37513: Admin bar sub menu items dashicon and screen readers
-----------------------------------------+--------------------------------
 Reporter:  afercia                      |       Owner:  afercia
     Type:  defect (bug)                 |      Status:  reopened
 Priority:  normal                       |   Milestone:  4.7
Component:  Toolbar                      |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:  ui, accessibility
-----------------------------------------+--------------------------------

Comment (by afercia):

 @keraweb interesting :)
 I'm not sure there would be consensus about introducing two new methods at
 this point of the release (we're almost in Beta 2) and they would need
 tests too. Before going into that, worth considering there are rules
 during the release cycle and Beta time is just for bug fixes, not
 enhancements. So there are probably just two options:

 1
 Go with a simpler fix.
 Not sure we need to check for the tree, could you please expand on that?
 Tried your patch and the arrows are printed out, they're just hidden below
 your plugin custom icons:

 [[Image(https://cldup.com/8DHQGReRQl.png)]]

 After all, ''any'' parent item (except the top level items) should get the
 arrow, unless I'm missing something. Also, I'd say there's no need to
 print two `<span>` elements (right and left): just one generic span and
 then adjusting the CSS could work. As far as I see, this would replicate
 the current situation, for example in your plugin you're already
 overriding the CSS with
 `#wpadminbar #wp-admin-bar-view-as .vaa-has-icon > .ab-item::before
 {display: none;}`
 to hide the default arrow. Of course the plugin CSS selectors should be
 updated, so this could cause some minor visual breakage in other plugins
 too and I guess we're a bit late to notify plugin authors with a make core
 post.

 2
 Revert this change :) Not a big deal since it's a minor accessibility
 improvement and can be done better in the next release cycle.

 Hint: if you pass `'tabindex' => '0'` to the `meta` of your menu items
 without links, they become focusable and operable with a keyboard. Small
 a11y improvement :) See [38035].

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37513#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list