-
Notifications
You must be signed in to change notification settings - Fork 1
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
Tracking handling of nameless regions and forms #2
Comments
Ah yes, good spot. There is an explanation of why the Landmarks extension behaves in this way, but on reflection that explanation is mistaken.
Whilst it's true that assistive technologies generally ignore both unlabelled What this issue is sayingIn summary... the following are not landmarks:
But the following all are landmarks:
Testing in the wildHowever, I tested it and found some interesting stuff... Here's the HTML I used... <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Explicit regions</title>
</head>
<body>
<h1>Explicit regions</h1>
<div role="region">
<p>This should be in a "region" region.</p>
</div>
<div role="form">
<p>This should be in a "form" region.</p>
</div>
</body>
</html> Here's what I found...
Now I think that some of this is because of the same reason that Landmarks initially discounted unlabelled "form" and "region" elements (regardless of how they got their roles)—because things like ASP sites used to surround everything on the page in a It sounds like the specs are saying that we need to care about where an element got its role, which is interesting (and, again, reflects the practical considerations regarding noise caused by too many landmarks, above). I think the next bit of testing to do would be to see how the screen-readers fare with unlabelled and labelled Reference infoWe had a bit of a discussion about these in the ARIA/HTML specs a while back; I'll need to refresh my memory, but the most up-to-date locations for those issues appear to be w3c/aria#513 and w3c/core-aam#11 I'll try to do more on this soon, but thought I should reply with what I have for now :-). |
If I understand correctly, my interpretation of the spec is correct, it's just that the spec is far from perfect in this aspect. Still I would argue that the tests in this repo should reflect the current state of the spec. We can work to improve it separately. |
Absolutely, I agree—we have to stick to the spec(s) here, even if we decide not to in our own code, at least temporarily. It seems to me that the next steps should be:
I’m happy to look into all of the above. Hopefully, after going through these steps, some consensus will emerge as to whether the spec should change, or the assistive technologies should/will :-). |
That is not my understanding. A form role is always a landmark. But a |
Ah, yes, of course, that's the correct way to put it (and it sounds simpler that way, too :-)). I guess the question is: should assistive technologies convey unlabelled form/region landmarks that have been explicitly set by the author (e.g. It's interesting that NVDA conveys unlabelled "form" regions, but not unlabelled "region" regions—perhaps that's because of experience in the wild; would be good to know. |
I've been looking at the main ARIA 1.1 spec again and this is what it has to say about the "region" role:
Does the "MUST" at the start mean that It seems the most logical option would be the former, which matches all of the above interpretation of the spec. With the "form" role it's a bit different—there's no "MUST" regarding the label:
This clearly implies that (Incidentally, I was thinking about surfacing errors with landmarks to the user in the Landmarks extension.) |
So |
We got a clear and helpful answer on how this apparent failure should be handled:
The latest (1.2) draft of the ARIA spec has a section called "handling author errors" whic contains a lot of info about this stuff. It doesn't, however, specifcially mention errors where a required label is missing, so we are thinking about making a suggestion on that. |
In summary... For forms:
For
The changes to the tests in this repo that are needed are:
Overall, though, it looks like the tests are accurate as they are, though making some annotations to the metadata could help improve clarity for the future. Thanks @xi for your help in clarifying this :-). |
I am a bit confused. the tweet you quoted before said the opposite, right?
Yes, you are right. I had some reason to write this issue, but I don't really remember which test it was. Maybe I just misread something. However, looking through it again, I think there actually is one mistake: There is a |
Update: Ah, I understand the apparent discrepancy between the tweet and the Core AAM now: a "region" with no accessible name would still appear in the accessibility tree, but as per the Core AAM, it would take whatever the default role for such a thing is in the host environment; it would not be given a landmark role. (cc @xi)
Well spotted. I think I should do some more testing to see how screen-readers handle this, but I agree that it should be there, per the spec. |
With some help :-) I think we've got to the bottom of [how forms and regions, `<form>` and `<section>` should be recognised](#2 (comment)). This also includes some updates to the expectation metadata schema, and hopefully helpful links to give this background info. Further, the schema requires the root of the expectations themselves to be an array. Closes #2.
I asked around at work before merging the PR, and we all agreed this interpretation is sound. Thanks @xi (and everyone else who helped). I've just tagged 0.2.1 with this change in it. |
* Support aria-roledescription (closes #316) * Fix form labelling requirements in line with recent developments in matatk/page-structural-semantics-scanner-tests#2
@matatk Making sure you noticed that Core-AAM now says that role=form without accessible name is NOT a landmark. |
@carmacleod I may be missing something, but I don't really understand your point. According to WAI-ARIA, |
The link you gave is for ARIA 1.1, and it says the following for form:
but ARIA 1.2 is moving to Candidate Recommendation as we speak, and the spec for form now says:
So, looking at @matatk's #2 (comment) above, the 3rd point is no longer true:
Instead, the following 4 points are now true:
|
Thanks for the clarification. I don't like that |
Yep. It's consistent with html |
Acronyms are expanded in here to help any casual readers who may stumble across this. Thanks for the heads up @carmacleod, and for seeking clarification @xi, and sorry for my slow reply. As you say, this issue will need to be reopened and addressed to match the spec. My first thought, though, is that should be done only when 1.2 reaches W3C Recommendation (REC) stage, as it's not official until then. However, I think you have more experience in standards, and particularly this one, than me, so would be interested as to your thoughts. Sometimes, if all the UAs and AT already support a Candidate Recommendation (CR) I can appreciate it may be appropriate to go with that. Because this is a test suite, though, I feel some significant pressure to stick to the finalised spec—because in theory we're making a decision that will affect downstream projects' support status. I'll need to do some testing to see how ATs are handling I've been thinking again about how to build a tool above this test suite that can be used to test AT as well as projects like @xi's a11y-outline and the Landmarks extension—and specifically the issue that @xi raised about getting it adopted somewhere (#29; I'm not sure WPT is the right place, as discussed there, but will see if I can talk with more people to gauge where might be a good home—look out for more on that thread when possible, too). |
AFAIU, elements with the role
region
orform
are always landmarks and should not be ignored. However, an HTML<form>
element only gets the implicit roleform
if it has an explicit label. Same for<section>
andregion
.https://www.w3.org/TR/html-aam-1.0/#html-element-role-mappings
The text was updated successfully, but these errors were encountered: