[wp-trac] [WordPress Trac] #38636: Allow data attributes to be added to WP Admin Bar menu items
WordPress Trac
noreply at wordpress.org
Thu May 4 18:17:44 UTC 2017
#38636: Allow data attributes to be added to WP Admin Bar menu items
------------------------------------+-----------------------------
Reporter: keraweb | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Future Release
Component: Toolbar | Version:
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: accessibility
------------------------------------+-----------------------------
Changes (by pbiron):
* focuses: => accessibility
Comment:
I really like this idea, but think a more general solution that would
arbitrary HTML attributes would be even better (thus loosening the
paternalistic nature of the current code), ala
{{{
$wp_admin_bar->add_node(
'id' => '',
'parent' => '',
'title' => '',
'href' => 'https://nl.wikipedia.org/wiki/Nederland',
'meta' => array(
'type' => 'text/html',
'hreflang' => 'nl',
'data-test' => 'data-test content'
'onmousedown' => 'some_js_func()',
'aria-describedby' => 'some_html_id',
),
),
) );
}}}
Related: #40359, #40666
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38636#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list