aria-colindex values exposed on rows are not correctly exposed on cells
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
People
(Reporter: morgan, Unassigned)
References
(Blocks 2 open bugs, )
Details
Attachments
(1 file)
|
1.10 KB,
text/plain
|
Details |
this part of the aria spec says:
If the set of columns which is present in the DOM is contiguous, and if there are no cells which span more than one row or column in that set, then authors MAY place aria-colindex on each row, setting the value to the index of the first column of the set. Otherwise, authors SHOULD place aria-colindex on all of the accessibility children of each row.
In the accessibility tree, we only expose the value on the row, we do not propagate it to the cells nor increment it for additional cells in that row.
It is possible we want to handle this at the platform layer, though if all platforms ultimately want the same behaviour I think it is reasonable to handle it in core.
I found this does work when testing with VoiceOver in Safari
I'll attach a test that shows this behaviour in a sec.
| Reporter | ||
Comment 1•9 months ago
|
||
| Reporter | ||
Updated•9 months ago
|
| Reporter | ||
Updated•9 months ago
|
| Reporter | ||
Comment 2•9 months ago
|
||
if you prefer testing with an html snippet, here's the one I used to verify VO works to-spec in safari
data:text/html,<!DOCTYPE html>%0A<html lang="en">%0A<head>%0A<meta charset="UTF-8">%0A<title>VoiceOver aria-colindex test</title>%0A<style>%0Abody{font-family:sans-serif;padding:20px;max-width:700px}%0Atable{border-collapse:collapse;margin:1em 0}%0Atd{border:1px solid %23333;padding:8px 12px}%0Acaption{font-weight:bold;text-align:left;padding:4px 0}%0A.note{background:%23fffbe6;border:1px solid %23c90;padding:10px;margin:1em 0;border-radius:4px}%0A.exp{color:green;font-size:.9em;margin:.5em 0 1.5em}%0A</style>%0A</head>%0A<body>%0A<h1>VoiceOver aria-colindex test</h1>%0A<p class="note">Navigate with <b>VO+Right</b> through each table cell. Note which column number VoiceOver announces.</p>%0A%0A<h2>Test 1 - Baseline: aria-colindex on each cell</h2>%0A<p>Each cell has its own aria-colindex. VoiceOver should announce column 5, 6, 7.</p>%0A<table aria-colcount="10" aria-rowcount="20">%0A%20 <caption>Test 1 (baseline)</caption>%0A%20 <tr aria-rowindex="3">%0A%20%20%20 <td aria-colindex="5">Alpha</td>%0A%20%20%20 <td aria-colindex="6">Beta</td>%0A%20%20%20 <td aria-colindex="7">Gamma</td>%0A%20 </tr>%0A</table>%0A<p class="exp">Expected: column 5 of 10, column 6 of 10, column 7 of 10</p>%0A%0A<h2>Test 2 - Contiguous shorthand: aria-colindex on row only</h2>%0A<p>The row has aria-colindex=5; cells have none. Per ARIA spec columns are contiguous from 5. </p>%0A<table aria-colcount="10" aria-rowcount="20">%0A%20 <caption>Test 2 (colindex on row only)</caption>%0A%20 <tr aria-rowindex="3" aria-colindex="5">%0A%20%20%20 <td>Alpha</td>%0A%20%20%20 <td>Beta</td>%0A%20%20%20 <td>Gamma</td>%0A%20 </tr>%0A</table>%0A<p class="exp">Expected per spec: column 5 of 10, column 6 of 10, column 7 of 10</p>%0A%0A<h2>Test 3 - Comparison: aria-rowindex on row only (known working)</h2>%0A<p>Row has aria-rowindex=3; cells have none. Firefox inherits this. Expect row 3 of 20 for each cell.</p>%0A<table aria-colcount="3" aria-rowcount="20">%0A%20 <caption>Test 3 (rowindex on row only)</caption>%0A%20 <tr aria-rowindex="3">%0A%20%20%20 <td aria-colindex="1">Alpha</td>%0A%20%20%20 <td aria-colindex="2">Beta</td>%0A%20%20%20 <td aria-colindex="3">Gamma</td>%0A%20 </tr>%0A</table>%0A<p class="exp">Expected: row 3 of 20 for each cell</p>%0A</body>%0A</html>
Comment 3•4 months ago
•
|
||
I'm not convinced the spec does say we need to expose it on the cells. It says that authors can just set it on the row, but I don't see any mention that user agents are responsible for exposing aria-colindex on the cell in this instance based on incrementing from the value on the row. Even Core AAM makes no mention of this. Am I missing something?
Now, what the spec says and what is required in reality might be two different things. If VoiceOver needs it exposed on the cell, then we need to get that fixed in the spec. Even then, it's unclear to me what other platforms need.
Comment 4•4 months ago
|
||
FWIW, Chromium exposes incremented colindex on the cell when aria-colindex is set on the row for IA2, so I think we're heading for a spec bug here (unless I missed something in the spec).
| Reporter | ||
Comment 5•4 months ago
|
||
(In reply to James Teh [:Jamie] from comment #3)
I'm not convinced the spec does say we need to expose it on the cells. It says that authors can just set it on the row, but I don't see any mention that user agents are responsible for exposing aria-colindex on the cell in this instance based on incrementing from the value on the row. Even Core AAM makes no mention of this. Am I missing something?
I don't think you're missing something in the spec, no. The attributes AAM specifies for mac seem to only be exposed at the cell level for both Chrome and Safari, so I was working backwards from that.
Now, what the spec says and what is required in reality might be two different things. If VoiceOver needs it exposed on the cell, then we need to get that fixed in the spec. Even then, it's unclear to me what other platforms need.
FWIW, Chromium exposes incremented colindex on the cell when aria-colindex is set on the row for IA2, so I think we're heading for a spec bug here (unless I missed something in the spec).
Yeah agree, I think this is a spec bug. Safari's behaviour matches Chrome's.
I'm so used to just working around implemented behaviour I forget there's a process for getting issues fixed ! 🤦♀️
| Reporter | ||
Comment 6•4 months ago
|
||
I can file a spec issue for this.
:Jamie would you agree this should be resolved in AAM rather than the aria spec? It sounds like web authors should be free to expose this on either the cell or the row, but browser vendors should ensure ATs receive this on the appropriate acc (and sounds like that acc is "cell" here). That said, it sure would be easier if web authors were limited to cell exposure... but I think we can cope
Comment 7•4 months ago
|
||
(In reply to Morgan Reschenberg [:morgan] from comment #5)
I'm so used to just working around implemented behaviour I forget there's a process for getting issues fixed ! 🤦♀️
Heh, that's fair. There's no reason we can't do both in parallel. I just don't like the spec diverging from reality, as it can cause pain later.
(In reply to Morgan Reschenberg [:morgan] from comment #6)
I can file a spec issue for this.
Thanks.
:Jamie would you agree this should be resolved in AAM rather than the aria spec?
Yes. For example, Core AAM contains this section on Group Position, though this may just need a note for aria-colindex and aria-rowindex rather than an entire dedicated section.
It sounds like web authors should be free to expose this on either the cell or the row
The ARIA spec is pretty clear that authors can specify it on the row. Generally, it's probably best for us to avoid changing things that relate to author expectations unless they cause significant harm we can't resolve elsewhere.
but browser vendors should ensure ATs receive this on the appropriate acc (and sounds like that acc is "cell" here).
I agree.
That said, it sure would be easier if web authors were limited to cell exposure... but I think we can cope
Yeah, it's awkward for sure. I think we might need to deal with this in CachedTableAccessible rather than the normal group position code, but we'll see.
| Reporter | ||
Updated•4 months ago
|
Description
•