How to add title tags to a widgetized sidebar
-
Is there a way to add the title tag (title=””) to the sidebar menu in a widgetized sidebar menu, for accessibility?
I found this related post for adding a title tag to the search form:
http://wordpress.org/extend/ideas/topic/search-add-title-tag-make-it-wcag-2-compliant-accessibility?rate=2&topic_id=1894&_wpnonce=9e2317624cHowever could not find the code referenced in that post. I would like to be able to add a title tag to the search form as well.
Thanks,
-JEDs
-
Which widget do you want to add a title attribute to? And why do you think this will enhance accessibility – bearing in mind that most screen reader users have their software configured to ignore title attributes?
the sidebar menu
A custom menu to be more specific.
Why?: see the link I posted above.
What do you recommend, then?
I did locate and change the code for search to add a title tag there in my theme/searchform.php
Thanks
-JEDs
Why?: see the link I posted above.
That thread is talking about a missing label on a form. And the original respondent is actually incorrect. A title attribute would not satisfy the primary principles of WCAG 2.0 – that content is Perceivable, Operable, Usable and Robust.
Title attributes are not seen by sighted keyboard navigators (eg VR users) and may not be perceived by screen reader users either. So relying on title attributes fails Principle 1: Perceivable
Screen reader software in Forms Mode requires an association between form controls and their text labels – which is provided by the label attribute – not the title attribute. Without this association, the form may become unusable. So that fails Principles 2 & 3.
If you want to make your search form more accessible, add label markup and then position the label element off screen using CSS. Menu/navigation items don’t need anything else – especially if you’re using list markup.
Titles can be added in the new custom menus option in the Appearance tab.
Stand corrected by esmi that this does nothing for accessibility and removed that tag.
-JEDs
- The topic ‘How to add title tags to a widgetized sidebar’ is closed to new replies.