act-rules.github.io icon indicating copy to clipboard operation
act-rules.github.io copied to clipboard

"Table header cell has assigned cells" (d0f69e): test tables and grids separately?

Open Jym77 opened this issue 5 years ago • 1 comments

Currently, the rule targets a header which is descendant of "either table or grid" and checks whether it has assigned cell or gridcell.

Potential problem is that it is possible to pass the rule with a table having only gridcell (or with a grid having only cell) which seems incorrect (not fully sure it is a SC failure, however).

Should we try to de-entangle that so that? (easiest way is to split rule, could be doable also by splitting Expectation) Should we instead have a rule "table has no gridcell / grid has no cell"?

Jym77 avatar Dec 11 '20 11:12 Jym77

[10:57] <Wilco> RESOLUTION: update rule title to "Header cell has assigned cells"

[10:58] <Wilco> RESOLUTION: Update the rule to only allow "cell" roles in "table" and "gridcell" roles in "grid"

WilcoFiers avatar Feb 25 '21 10:02 WilcoFiers

Following @Jym77 's comment from #1548 I think we can close this issue as we are restricting the rule to HTML only.

Some reasoning:

  • We are unable to determine how table headers are assigned to grid cells in ARIA only grids as this is not covered by any related technical documentation,
  • all cells within a <table role="grid"> element should have the role of gridcell as per the definition of grid, see below:

if an author applies the grid role to an HTML table element, the author does not need to apply the row and gridcell roles to the descendant HTML tr and td elements because the user agent will automatically make the appropriate translations.

Although it would be nice to have a rule that checks if all cells within a grid are grid cells it is likely that this happens most of the time because in practice, the authors tend to use the <table role="grid"> element instead of going with <div> and <span> elements. The point is that I think we are already covering a high percentage of content out there.

I'd like to know what others think though.

ajanec01 avatar Nov 03 '22 12:11 ajanec01