[wp-trac] [WordPress Trac] #31090: Menus manage locations form accessibility improvements
WordPress Trac
noreply at wordpress.org
Thu Jan 22 13:58:50 UTC 2015
#31090: Menus manage locations form accessibility improvements
-----------------------------------+--------------------------------
Reporter: afercia | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.2
Component: Menus | Version: 3.6
Severity: normal | Resolution:
Keywords: has-patch ui-feedback | Focuses: ui, accessibility
-----------------------------------+--------------------------------
Comment (by afercia):
@melchoyce
> Definitely a lot better. Looks great.
thanks, such a small change :)
@jorbin
yup can be confusing at first sight, this technique is already used in the
admin, for example in the "Publish" postbox:
{{{
<a href="#post_status" class="edit-post-status hide-if-no-js">
<span aria-hidden="true">Edit</span> <span class="screen-reader-text">Edit
status</span>
</a>
}}}
this way, screen readers will read out "Edit status" and will ignore
"Edit" which, alone, doesn't give enough context to screen reader users:
Edit... what? Sighted users have enough information about the link purpose
thanks to the visual context.
Back to the `locations-edit-menu-link` specific case:
* for screen reader users "Edit" ''is always hidden'', regardless the link
is hidden or not
- when the link gets visible:
- screen reader will read out just the "Edit status" part
- sighted users will see just "Edit"
http://www.w3.org/TR/wai-aria/states_and_properties#aria-hidden
"Authors MAY, with caution, use aria-hidden to hide visibly rendered
content from assistive technologies only if the act of hiding this content
is intended to improve the experience for users of assistive technologies
by removing redundant or extraneous content. Authors using aria-hidden to
hide visible content from screen readers MUST ensure that identical or
equivalent meaning and functionality is exposed to assistive
technologies."
It's also a way to have a fully translatable, clean, string without mixing
it with HTML. Currently used in Twenty Fifteen too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31090#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list