aria
aria copied to clipboard
Discourage authors from using role=none/presentation on table cells (and maybe list items)
Describe your concern
Someone tried to use role=none on a table cell, e.g.
Name | Subject |
---|---|
Ranjit | (no subject) |
Some browsers are removing the native table cell role. Others are ignoring the role=none markup. When browsers remove the native table cell role it usually just breaks things; the content is technically in the accessibility tree, but screen readers skip over it because it's no longer part of the table.
In theory we could have a similar issue with list items but it's not as bad. In general when you have nested semantic elements like table/tr/td or ul/li I think it doesn't make sense to try to use role=none on the child. Either remove semantics from the whole thing or not at all.
Link to the version of the specification or documentation you were looking at at.
https://w3c.github.io/aria/#presentation
Link to documentation:
Does the issue exists in the editors draft (the editors draft is the most recent draft of the specification)?
Yes, it's basically silent on what role=none should be applied to
See w3c/aria-practices#2968
Discussed in the ARIA working group today: https://www.w3.org/2024/03/21-aria-minutes.html#t07
@mcking65 please file the child APG issue for this as discussed in the minutes above.
ARIA in HTML already identifies this as an author error - https://w3c.github.io/html-aria/#el-td
but to be honest, it probably needs to be more nuanced than that.
for better/worse, the below 'should' be possible (as described in the minutes)
<table>
<tr>
<td role=none>
<div role=cell>
<!-- cause people do whacky things for sometimes 'legit' reasons -->
</div>
</td>
...
</tr>
...
</table>