NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 1033 - Please support aria-posinset, aria-setsize on <tr>
Please support aria-posinset, aria-setsize on <tr>
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: ARIA
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-12 17:11 CEST by Aaron Leventhal
Modified: 2017-04-13 14:11 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Leventhal 2017-04-12 17:11:36 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
Comment 1 Michael[tm] Smith 2017-04-12 23:58:27 CEST
(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
Comment 2 Aaron Leventhal 2017-04-13 00:14:30 CEST
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?
Comment 3 Michael[tm] Smith 2017-04-13 06:49:21 CEST
> 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
Comment 4 Aaron Leventhal 2017-04-13 13:58:44 CEST
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.
Comment 5 Aaron Leventhal 2017-04-13 14:03:55 CEST
Im curious, what's the history of the text "at this point" ? Makes it sound like there was some doubt.
Comment 6 Michael[tm] Smith 2017-04-13 14:07:50 CEST
(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.
Comment 7 Aaron Leventhal 2017-04-13 14:11:56 CEST
Ok, "at this point" also often means "at the current moment in time", which is how I took it.