[wp-trac] [WordPress Trac] #29475: Adding ARIA roles in wp_nav_menu

WordPress Trac noreply at wordpress.org
Tue Sep 2 20:15:27 UTC 2014


#29475: Adding ARIA roles in wp_nav_menu
---------------------------+-----------------------------
 Reporter:  Chrisdc1       |      Owner:
     Type:  enhancement    |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Menus          |    Version:  3.9.2
 Severity:  normal         |   Keywords:
  Focuses:  accessibility  |
---------------------------+-----------------------------
 In most cases ARIA roles are probably best handled on a theme level,
 however in a few cases it might be worth adding them into the HTML output
 by wp_nav_menu()

 1. role="menuitem" (added to .menuitem li tags) should be applicable in
 all cases and is currently relatively difficult to add by other methods.

 2. role="menubar" ( added to top-level ul ) can easily be added in themes
 using the item_wrap parameter of wp_nav_menu(), however it could be added
 to the default value for this parameter.

 Aria states and properties are often subject to change and are probably
 best handled on the front end, but aria-haspopup="true" (added to
 .menuitem li tags with child menus) could be added as an option for themes
 with dropdown menus.

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


More information about the wp-trac mailing list