[wp-trac] [WordPress Trac] #50355: Replace title of the updates link in the admin bar by an aria-label attribute
WordPress Trac
noreply at wordpress.org
Wed Jun 10 15:42:26 UTC 2020
#50355: Replace title of the updates link in the admin bar by an aria-label
attribute
-------------------------+----------------------------
Reporter: Chaton666 | Owner: audrasjb
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.5
Component: Toolbar | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: accessibility
-------------------------+----------------------------
Comment (by Chaton666):
Finally, it is not possible to add an aria-label attribute to the menu
item as I suggested (the ''add_node'' function does not allow this).
However, it is possible and better to keep the text for screen readers
already present, remove the title attribute from the link, and add the
explicative sentence to the total.
Here is a .diff file attached, of a patch proposal. There is no visible
difference in the dashboard, the change is in the HTML output.
Before :
{{{
<li id="wp-admin-bar-updates">
<a class="ab-item" href="http://example.com/wp-admin/update-
core.php" title="1 Plugin Update, Translation Updates">
<span class="ab-icon"></span>
<span class="ab-label">2</span>
<span class="screen-reader-text">1 Plugin Update,
Translation Updates</span>
</a>
</li>
}}}
After:
{{{
<li id="wp-admin-bar-updates">
<a class="ab-item" href="http://example.com/wp-admin/update-
core.php">
<span class="ab-icon"></span>
<span class="ab-label">2 <span class="screen-reader-text">
updates: 1 Plugin Update, Translation Updates </span></span>
</a>
</li>
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50355#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list