Don't put aria-label on generic elements like divs - Manuel Matuzovic
Briefly

Don't put aria-label on generic elements like divs - Manuel Matuzovic
Generic elements such as divs and spans have a default role of “generic.” ARIA specifies roles that cannot be named, including “generic,” so labeling them with aria-label or aria-labelledby is not allowed. Practical testing shows inconsistent screen reader behavior: VoiceOver in Safari announces the label with “group,” while Talkback and Narrator announce only the label or label plus content. Other screen readers ignore the author-defined label and announce the text content instead. Additional testing with empty generic elements, including ones with zero size and ones that occupy space, produced no announcement in several screen readers. Exceptions can exist, such as when using elements like section that have different implicit roles.
"The section element has a generic role by default. If you put aria-label or aria-labelledby on the element, its implicit role ch"
Read at Manuel Matuzovic
Unable to calculate read time
[
|
]