You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the rule always applies, the result is that nested elements that can only be labeled by the author, but do not require a label, will not pass a label to the ancestor element if they are not explicitly labeled, and thus are empty.
This applies to the following ARIA roles, among others:
application
article
banner
blockquote
definition
document
feed
figure
group
list
...
<a href=...><blockquote>quote</blockquote></a>
would thus lead to an unlabeled link. This is not only a theoretical problem, but actually leads in Chrome and Firefox always to an unlabeled link, which is accordingly also output by the screen reader without a label (in JAWS for some ARIA roles always, for others only if the link has e.g. a title attribute)
Even if these elements are explicitly labeled, it is worth checking whether the label or rather the text content should be transmitted:
According to the current rule, the aria-label is output as a link label. The question is whether it doesn't make more sense to output the text content. The problem is that screen readers no longer output the text content even when reading linearly. However, browsers and screen readers interpret the rule differently. For example, the text content is not output at all for an article, but it is output for a list.
It should also be noted that screen readers often automatically use the text content as a label if no explicit label is available, e.g. for lists and tables (but only in the element overview).
And how can I identify if HTML elements support name from content? For ARIA roles it's in the specification, but not for HTML elements...
However, the problem occurs only in the specification, the browsers ignore the error in the specification and use the text content as a label (unlike with the ARIA roles that have Name from Author, see above)
If the rule always applies, the result is that nested elements that can only be labeled by the author, but do not require a label, will not pass a label to the ancestor element if they are not explicitly labeled, and thus are empty.
This applies to the following ARIA roles, among others:
<a href=...><blockquote>quote</blockquote></a>
would thus lead to an unlabeled link. This is not only a theoretical problem, but actually leads in Chrome and Firefox always to an unlabeled link, which is accordingly also output by the screen reader without a label (in JAWS for some ARIA roles always, for others only if the link has e.g. a title attribute)
Even if these elements are explicitly labeled, it is worth checking whether the label or rather the text content should be transmitted:
<a href=...><ul aria-label=list><li>item 1<li>item 2</ul></a>
<a href=...><article aria-label=article>content</article></a>
According to the current rule, the aria-label is output as a link label. The question is whether it doesn't make more sense to output the text content. The problem is that screen readers no longer output the text content even when reading linearly. However, browsers and screen readers interpret the rule differently. For example, the text content is not output at all for an article, but it is output for a list.
It should also be noted that screen readers often automatically use the text content as a label if no explicit label is available, e.g. for lists and tables (but only in the element overview).
And how can I identify if HTML elements support name from content? For ARIA roles it's in the specification, but not for HTML elements...
Related: #113, #118 and https://github.com/w3c/aria/issues/899
The text was updated successfully, but these errors were encountered: