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
{{ message }}
This repository was archived by the owner on Jul 30, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 30, 2019. It is now read-only.
aria-sort on table headers requires a bunch of redundant roles #909
There apparently was a bug filed against the validator that it complained when aria-sort is added to a <th>. It required role="columnheader" The bug was closed because the spec apparently requires it.
Apparently this is because <th> is not supposed to have any semantic value because there are so many layout tables in the wild so the dev has to add a redundant aria role.
It seems like a weird situation, I think it should be perfectly fine to do this and not require redundant aria <th aria-sort="ascending" ...>
Can we solve this, and not burden developers by forcing them to add redundant roles?
Then the Validator should not throw an error on this, right? <th aria-sort="ascending" ...>
So should the bug be filed there? I've reopened over there.
If you want for the ARIA spec to say that columnheader or rowheader should be allowed even with the explicit role value isn’t columnheader or rowheader then I guess you need to raise an issue against the ARIA spec requesting that.
This is very generic. There are two types of cells in HTML tables. Headers <th> and data <td>. Why not map it to one of those in the API, instead of cell?
Then we can file a bug against wai-aria to allow an api mapping of generic header in addition to columnheader and rowheader
this will offload the burden that is on authors currently, which forces them to add an role to th every time they want to use aria-sort
Activity
stevefaulkner commentedon Jun 15, 2017
@DavidMacDonald this is the wrong spec to file this issue on, also it is not the case that
thhas no semantics - see the API mappings https://w3c.github.io/html-aam/#el-thDavidMacDonald commentedon Jun 16, 2017
@stevefaulkner
Then the Validator should not throw an error on this, right?
<th aria-sort="ascending" ...>So should the bug be filed there? I've reopened over there.
sideshowbarker commentedon Jun 17, 2017
The ARIA spec itself is the relevant spec here.
So, see https://www.w3.org/TR/wai-aria-1.1/#h-aria-sort, which says that
aria-sortmust not be used when therolevalue is anything other thancolumnheaderorrowheader.If you want for the ARIA spec to say that
columnheaderorrowheadershould be allowed even with the explicitrolevalue isn’tcolumnheaderorrowheaderthen I guess you need to raise an issue against the ARIA spec requesting that.DavidMacDonald commentedon Jun 26, 2017
@stevefaulkner
I see, it gets
role="cell"This is very generic. There are two types of cells in HTML tables. Headers
<th>and data<td>. Why not map it to one of those in the API, instead ofcell?Then we can file a bug against wai-aria to allow an api mapping of generic
headerin addition tocolumnheaderandrowheaderthis will offload the burden that is on authors currently, which forces them to add an role to
thevery time they want to usearia-sorthartman commentedon Jun 29, 2017
I think it should be noted that columnheader and rowheader themselves are defined as th[scope="col"] and th[scope="row"] base concepts.
The scope attribute itself however is currently a question mark in AAM: https://w3c.github.io/html-aam/#att-scope
LJWatson commentedon Jun 29, 2017
Please note this issue has been closed in relation to the HTML spec. Issues relating to ARIA and the HTML AAM should be filed on the relevant repos: