[wp-trac] [WordPress Trac] #58098: Empty top-level menu item to have role=button

WordPress Trac noreply at wordpress.org
Thu Apr 6 18:23:44 UTC 2023


#58098: Empty top-level menu item to have role=button
-------------------------+------------------------------
 Reporter:  robanna      |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Menus        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  accessibility
-------------------------+------------------------------
Changes (by sabernhardt):

 * focuses:   => accessibility
 * version:  6.2 =>


Old description:

> For accessibility, an empty top-level menu item should have role="button"
> added to the custom link.
>
> When setting up a menu with a top-level menu item with a custom link that
> is blank or to an anchor, the output looks like:
> <a>Top Menu Item</a> or <a href="#">Top Menu Item</a>
>
> It should have role=button added when that is the case:
> <a role="button">Top Menu Item</a> or <a href="#" role="button">Top Menu
> Item</a>

New description:

 For accessibility, an empty top-level menu item should have
 `role="button"` added to the custom link.

 When setting up a menu with a top-level menu item with a custom link that
 is blank or to an anchor, the output looks like:
 `<a>Top Menu Item</a>` or `<a href="#">Top Menu Item</a>`

 It should have `role=button` added when that is the case:
 `<a role="button">Top Menu Item</a>` or `<a href="#" role="button">Top
 Menu Item</a>`

--

Comment:

 Related: #13273

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


More information about the wp-trac mailing list