[wp-trac] [WordPress Trac] #32839: Menu Customizer: review Available Menu Items Panel keyboardAccessible()

WordPress Trac noreply at wordpress.org
Tue Jun 30 14:35:20 UTC 2015


#32839: Menu Customizer: review Available Menu Items Panel keyboardAccessible()
---------------------------------------+-------------------
 Reporter:  afercia                    |      Owner:
     Type:  defect (bug)               |     Status:  new
 Priority:  normal                     |  Milestone:  4.3
Component:  Customize                  |    Version:  trunk
 Severity:  normal                     |   Keywords:
  Focuses:  accessibility, javascript  |
---------------------------------------+-------------------
 In the Menu Customizer, when the Available Menu Items Panel is open,
 [https://core.trac.wordpress.org/browser/trunk/src/wp-admin/js/customize-
 nav-menus.js?rev=32971#L480 keyboardAccessible()] tries to implement some
 sort of "arrows navigation" through the available menu items. Currently it
 doesn't work, I may be wrong but it looks like it's using a couple of
 wrong jQuery selectors and it's trying to move focus to elements that are
 not focusable.

 Beside this, trying to handle keydown events and arrow keys breaks screen
 readers native functionalities because they reserve the arrow keys for
 their own navigation. Moreover, browsers/screen readers combinations do
 their own things with event handlers and they deliver events in ways most
 developers wouldn't expect.

 Even if fixed, this would never work with screen readers. Much like what
 happens in the Media Grid where navigating through attachments with the
 arrow keys doesn't work when using screen readers.

 Now that the available menu items have buttons, keyboard accessibility is
 guaranteed because they're native focusable elements and I don't see any
 reason to implement a JavaScript based navigation.

 I would recommend to reduce keyboard enhancements here to a bare minimum,
 keeping just the noop on the search field when empty and the Escape and
 back tab things.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32839>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list