-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What to do about the rowgroup
discrepancy between the spec and implementations?
#474
Comments
@cookiecrook what counts as substantial user benefit? and why consider it arbitrary when they are defined in HTML as:
|
I just mean that that browser and platform accessibility implementations haven't used them… Ever, as far as I can tell. I've verified this in Gecko, Chromium, and WebKit. They aren't reflected in any accessibility inspector, either. As far as I know, there is no special accessibility behavior for thead/tbody/tfoot. I am aware there is is special behavior when printing large tables that span multiple pages of paper (the thead and tfoot are repeated on each page) but as far as AAMs and AT are concerned, these are ignored elements, and always have been.
This is in the context of WPT tests for HTML-AAM. Passing these values would require a change in every browser that introduces risk without any user benefit that I can perceive, and possible cascade changes to a variety of assistive technologies.
In this case any user benefit would be worth discussing. I don't see any. Since the implementations are aligned and there isn't a user-driven clamor to support the
…unless there is some functionality specific to Windows that I'm missing in my Mac-side investigations of these browser implementations. |
Gecko normally chooses not to expose thead, tbody and tfoot because they don't really serve much of a purpose, especially given that tables always have a tbody. However, if you force an Accessible to be created (e.g. tabindex or aria-label), Gecko will create an Accessible and it will have the rowgroup role. |
@jcsteh that makes sense, @cookiecrook @aleventhal does this sound reasonable? default |
To be clear, Gecko doesn't expose them with a generic role if there's no tabindex, aria-label, etc. They don't exist in the a11y tree at all, more like role="none". As I understand it, those two things are different, albeit subtly so. |
Having said that, I think there's some general confusion around generic things that needs to be sorted out. For example, div and span map to role generic, but both Chromium and Gecko don't always expose them in the a11y tree to improve performance/minimise tree complexity. Edit: Chrome always exposes generics in the internal a11y tree, but marks them as ignored, so they're effectively not exposed to platform APIs. Firefox doesn't have a concept of ignored; it just doesn't include them in the tree at all in some cases. |
@jcsteh wrote:
no role works for me |
Is there any real use for the rowgroup role for the assistive technologies? I found it ever only a required grouping structure without any usefulness for AT. |
The only usefulness I have found is to allow you specify a grouping as uninteresting when the browser would otherwise try to expose it as a generic breaking the table structure. |
@stevefaulkner wrote:
I'll update the test and find out what Chromium and WebKit do with those. @jnurthen wrote:
I think the same would be true whether you used |
I get different results on Chrome running locally ("rowgroup" w/ or w/o the tabindex) than in Chrome on the WPT CI servers ("none" w/o tabindex, and "rowgroup" w/tabindex). @aleventhal any chance that's a recent change in Chromium? WebKit returns no role ("") in both circumstances on current STP. |
As the element is automatically made focusable in FF you can't use role=none as it is ignored - and role=tbody doesn't exist. |
role=tbody was a typo. I meant role=rowgroup... I was saying that (focusability aside) both role=rowgroup (on thead/tbody/tfoot) and role=none result in them being ignored and therefore identical in the platform tree, in both WebKit and Chrome. Of note: My local tests indicate a recent Chrome update vends the expected "rowgroup" role to |
In the ARIA call, @jnurthen mentioned another test case with a focusable/scrollable tbody. |
Edit: I finished reading through this commit and no, it doesn't appear to be changing anything about the rowgroup. |
Chrome does basically the same as Firefox. Internally, the rowgroup object actually always gets created but is ignored and not exposed in the platform tree unless necessary (needs to be an event target e.g. for focus, or has additional important properties like aria-label). |
@jcsteh do you think there is any potential regression in AT behavior if we just expose them all? Do you have a preference? Otherwise, it's probably only 1-2 hours to update Chrome's implementation and tests, so I'm fine making the change if that's what everyone decides. I'd probably be swayed by one of Jamie's arguments. |
…but there is a recent change to the results for this test in WPT.fyi (Canary?) compared to my local Chrome (stable 112…). 112 exposes rowgroup role to |
Sounds like a regression that needs a new issue filed at crbug.com then. |
I'm not comfortable filing a bug that Chromium is "wrong" given that we don't yet have consensus on what the behavior should be. |
fwiw, i tend to agree that if the elements are not provided attributes important to accessibility (name, tabindex, etc.) then we could update the spec to indicate the element is not mapped. but if these attributes are provided , then presently rowgroup seems the best role we have to map to. i'm not seeing a downside to that at this time. |
discussed at https://www.w3.org/2023/05/11-aria-minutes#t05 |
We recently had a bug filed against Firefox that made me realise there might be a semantic value to rowgroup for HTML tables: scope="rowgroup". Firefox doesn't currently support that, but if it did, it would need to know which rows were in the same group. |
could that attribute also provide the signal to expose the rowgroup role? so essentially if the tbody/foot/head is named, made focusable, or given other table attributes such as scope, that would mean the element needs to be exposed to the accessibility tree - then map to rowgroup. and otherwise, it can be treated as ignored or generic? |
Sounds reasonable, but we'll still need to make sure there isn't significant downstream impact to AT. Update: However, if there is impact, I expect WebKit will be able to do what Chrome is currently doing: returning the |
The problem is that the scope attribute is on descendants, not on the rowgroup. That means we have to make decisions about whether to put the rowgroup in the tree by either scanning all descendants first or by adjusting the ancestry when we hit a descendant with scope. In addition, if a new cell gets added with a scope, we'd have to adjust the ancestry or potentially rebuild the tree. That's all possible, but super complicated and error prone. |
ah yes, sorry @jcsteh i misremembered that. that is a bit odd, hmm... |
If I understand correctly, there seems to be agreement that at the very least, we should expose these as rowgroup if focusable, named, etc. For the purposes of WPT/Interop 2024, is it reasonable at this point to change the rowgroup tests in html-aam/table-roles.html so that the elements are focusable or labelled to avoid the remaining open question here? Or should we make those tests tentative until we get this resolved in the spec? |
The first HTML-AAM results landed today in WPT. In particular, the table roles tests show that Chrome and WebKit treat
thead
/tbody
/tfoot
as ignored (literalsnone
and""
respectively) rather thanrowgroup
from the HTML-AAM spec.https://wpt.fyi/results/html-aam/table-roles.html?label=master&label=experimental&aligned
Do we need to resolve this to use
rowgroup
or should this be a case where the spec should reflect the current reality rather than requiring an arbitrary change without substantial user benefit?The text was updated successfully, but these errors were encountered: