aria icon indicating copy to clipboard operation
aria copied to clipboard

Discourage authors from using role=none/presentation on table cells (and maybe list items)

Open minorninth opened this issue 11 months ago • 3 comments

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

minorninth avatar Mar 05 '24 16:03 minorninth

See w3c/aria-practices#2968

mcking65 avatar Mar 21 '24 17:03 mcking65

Discussed in the ARIA working group today: https://www.w3.org/2024/03/21-aria-minutes.html#t07

spectranaut avatar Mar 21 '24 18:03 spectranaut

@mcking65 please file the child APG issue for this as discussed in the minutes above.

jnurthen avatar Apr 16 '24 17:04 jnurthen

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>

scottaohara avatar Jun 06 '24 19:06 scottaohara