Don’t Use aria-label on Static Text Elements | Ben Myers
January 16, 2025
Don’t use the aria-label or aria-labelledby attributes on
<div>
s,<span>
s, or other elements representing static/noninteractive text-level semantics, such as<p>
,<strong>
,<em>
, and so forth, unless those elements’ roles have been overridden with roles that expect accessible names.That’s a bit of a mouthful, and I couldn’t fit it all in the title.The Antipattern A very common accessibility bug involves applying the aria-label or aria-labelledby attributes to static, text-level semantics, especially s and s.
Source: Don’t Use aria-label on Static Text Elements | Ben Myers
Ben Myers explores the common antipattern of using aria labels with static elements, when they are designed for dynamic ones.