Role="text" is (presently) kinda not a thing, sorta. – Part of a Whole

Role=”text” is (presently) kinda not a thing, sorta.

this is my new favorite "why did you do this?" bit of code:

<span role="text" tabindex="0">
Text goes here
</span>

— Scott O'Hara (@scottohara) December 4, 2017

That tweet contains some of my new favorite code to find, when poking through the source of websites and applications.

<span role=”text” tabindex=”0″>
Text goes here
</span>

It’s a perfect example of a developer trying to make something accessible (appreciate the effort), but unfortunately it widely misses the mark on what one should be doing with ARIA attributes.

Just a little bit of code can [...]

Accessibility


5 stars; 95.2% of tests passed. [Note: this rating is a work in progress.]
Errors
Level ALevel AALevel AAAUnique
39264050

Error data courtesy of Tenon.io

Article Taxonomies

Categories: Terms: , , , , , ,