[wp-trac] [WordPress Trac] #38636: Allow data attributes to be added to WP Admin Bar menu items

WordPress Trac noreply at wordpress.org
Fri Jul 2 20:41:15 UTC 2021


#38636: Allow data attributes to be added to WP Admin Bar menu items
-----------------------------------------+-----------------------------
 Reporter:  keraweb                      |       Owner:  (none)
     Type:  enhancement                  |      Status:  new
 Priority:  normal                       |   Milestone:  Future Release
Component:  Toolbar                      |     Version:
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:  accessibility
-----------------------------------------+-----------------------------

Comment (by sabernhardt):

 Attached are two options for consideration and/or iteration, both
 incorporating `aria-current`:

 - [attachment:"38636.2.patch"] follows the previous patch by allowing any
 attributes except for the ones established by core. This does nothing to
 ensure valid attributes, though the `_render_item` function does not
 validate/sanitize the 'html' meta value currently either.
 - [attachment:"38636.selective.patch"] would continue restricting
 attributes to avoid invalid code. In addition to `aria-describedby`, I
 like `hreflang`, so both are included in an `$allowed` array.

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


More information about the wp-trac mailing list