问题
In a webpage there was a paragraph:Follow Us:Facebook,Twitter.The title was missing for social networking icons.When I inspected the code for the webpage, I saw :the title attribute value was missing: Though the developers say that these icons are clear and self-explanatory,absence of title is not a good accessibility practise.Moreover,as I have highlighted the code is also not as per correct HTML standard.Please suggest what else might be the problem if the title attribute value is missing in the code.
回答1:
There is no accessibility issue for a missing title
attribute in this context (on an <a href>
). Do not use it here.
https://www.paciellogroup.com/blog/2013/01/using-the-html-title-attribute-updated/
Situations in which the the title attribute is not useful due to lack of support:
- Displaying information for web content viewed on mobile phone browsers. Typically in desktop browsers title attribute content is displayed as a tooltip. From what I could find, tooltip display is not supported in any mobile browser and alternative visual methods of accessing title attribute content are not supported.
- Providing information for people who cannot use a mouse. Typically in desktop browsers, title attribute content is displayed as a tooltip. Although the tooltip behaviour has been supported for 10+ years, no browser (except IE10+ [on focusable elements]) as yet has implemented a practical method to display title attribute content using the keyboard.
- Using it on most HTML elements to provide information for users of a variety of assistive technologies. Access to title attribute information is not supported uniformly by screen readers
Since the above is copied from my answer to your other question, and this question is not clear what element has the title
, some more info...
https://www.paciellogroup.com/blog/2016/02/short-note-on-use-of-alt-and-the-title-attribute/
- alt="" is a standardised indication to screen reader software that the is decorative and can be safely ignored. Testing by Powermapper from 2015: IMG with null ALT and non-null TITLE attributes found issues with alt="" + non-empty title.
- Absence of an alt attribute results, in some screen reading screen reader software, not conveying the to users.
- Note: Found this issue with JAWS 17 and Chrome 48 on Windows 10. Testing by Powermapper from 2015: IMG with TITLE Screen reader compatibility found no issues with this pattern.
- Some browsers implement the HTML5 requirement that alt="" is equal to role="presentation" which results in the being removed from the accessibility tree, so despite there being a non empty title, the is hidden.
来源:https://stackoverflow.com/questions/43816880/title-attribute-value-is-missing-for-a-social-networking-icon