Bugzilla – Bug 1033
Please support aria-posinset, aria-setsize on <tr>
Last modified: 2017-04-13 14:11:56 CEST
It's common to use a <table> for an ARIA widget. This has the advantage of helping browsers expose a table interface to screen readers, and it's convenient. There's also nothing illegal about it, and many examples do it. Working on a treegrid sample for the ARIA authoring practices guide, and getting many errors like so: treegrid.html 35-36:10-97 error Attribute “aria-posinset” not allowed on element “tr” at this point. 35-36:10-97 error Attribute “aria-setsize” not allowed on element “tr” at this point. Here's the code that needs to validate: https://github.com/aleventhal/treegrid-tab-active-cells
(Going forward, please use https://github.com/validator/validator/issues for filing bugs; we’ve migrated to there and are just using the bugzilla now for old bugs.) So I see the source has role=row: <tr id="1" role="row" aria-level="1" aria-posinset="1" aria-setsize="1" aria-expanded="true"> But the list of allowed states and properties for role=row in the ARIA spec https://www.w3.org/TR/wai-aria/roles#row does not include "aria-posinset" and “aria-setsize”. So the checker is conforming to the spec on this. It seems like maybe you need to instead use role=treeitem
Good point. Unfortunately no one created a real treegrid when we made that spec. I'll go back and ask for a change, either to show this or to make treegrid use treeitems for children. I don't think the treegrid role allows treeitem children. Are you reading differently?
> I don't think the treegrid role allows treeitem children. Are you reading differently? No, you’re right — as far as my reading of the spec, it seems to say that role=treeitem is only allowed as a descendant of role=tree or role=group. So I’m not sure what markup to suggest here
I will file a bug and work on consensus -- it really doesn't make sense for row to support aria-level and aria-expanded unless it also supports these.
Im curious, what's the history of the text "at this point" ? Makes it sound like there was some doubt.
(In reply to Aaron Leventhal from comment #5) > Im curious, what's the history of the text "at this point" ? Makes it sound > like there was some doubt. It’s just some boilerplate that’s part of all error messages emitted for this class of errors by the RelaxNG-based validation backend. I guess the implication is meant to be that while the attribute is not allowed on the element in the particular context found in the markup, it may be allowed on the element in some other context.
Ok, "at this point" also often means "at the current moment in time", which is how I took it.