Closed AlexLloyd0 closed 3 years ago
HTML AAM / the HTML spec would be the places to call this out. We can point to the HTML spec / HTML AAM for more info, though. But I do think it's worth re-investigating if th
is exposed as a cell
in any modern browsers.
Ah yes, it is already in the HTML AAM spec, in the th
entries at https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings. I'll create a PR adding a link to that spec.
As for whether browsers ever expose th
as a cell
, I've found one case in which Chrome (incorrectly) calls a <th>
a gridcell
(below) but haven't found a cell
.
<table>
<tr>
<td>d</td>
<th>h</th>
</tr>
<tr>
<td>d</td>
<td>d</td>
</tr>
</table>
yes, i've noticed chrome having some odd roles exposed in the browser panel lately. haven't gotten around to seeing if they're incorrectly exposed at the platform level or if it's just the a11y panel in the browser that's quirky here. will investigate that later...
anyway, thank you logging this / making the pr.
closed via #246
The implicit semantics for
th
are described asBut it's not clear under which conditions a
<th>
should take each role.https://github.com/w3c/html-aria/issues/61#issuecomment-294574702 suggests an algorithm. Chrome behaves differently to this though, something like:
<td>
sibling, it has role ofrowheader
columnheader