-
Notifications
You must be signed in to change notification settings - Fork 126
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
Changes to what roles allow a name from author could break the web #1487
Comments
ARIA 1.2 prohibits authors but makes no statements about what browsers should do IMO we're going to need to revert this ARIA 1.3 change for this exact reason. We should forbid authors so validators can enforce - but still allow user agents to correct for author mistakes. I've mentioned strict accessibility modes before and been told this is a non-starter due to the need to then maintain 2 diverging code paths in browsers which would make each of them more fragile. |
Correctness is for the sake of correctness is great, but what are practical
benefits of the change? Otherwise, considering this is a not backward
compatible change and known for a lot of breakage, I'd go with "advice to
the authors" approach. I would say that strict rules are better to be
enforced by validation tools rather than having them hard-coded into
browsers: all in-browser validation goes at runtime performance cost, so I
like the idea to keep ARIA implementations as simple as possible.
…On Mon, May 17, 2021 at 2:18 PM Dominic Mazzoni ***@***.***> wrote:
I'm concerned about the new changes that disallow, e.g. aria-label on HTML
elements without a supported role.
As advice to authors, it sounds great. It's probably not ever correct to
put aria-label on a
with no tabindex or role.
But I'm concerned about browsers implementing this and enforcing it.
Browsers can't just make such a large breaking change like this without
carefully understanding the ramifications. We might have to add use
counters to see how prevalent this error is, and put a message in the JS
Console for 6 months to give developers warning.
And, we don't even know for sure if there aren't more obscure but valid
use-cases that would be broken by this. While screen readers largely ignore
such names, are we sure that all AT does? What about automated testing
tools?
I think we have two possible courses of action:
1.
Flag this as a major change and try to get all browsers onboard with
making it slowly and carefully so as not to break anything that users or
developers are relying on
2.
Or, maybe we need to introduce something new like an ARIA strict mode,
that would let developers opt-in to having this enforced.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1487>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALWPKOUF6MF3GPNOXMM6ULTOFMYPANCNFSM45A6ZGLA>
.
|
see #1476 |
@minorninth What about a third course of action, namely a message in the JS Console permanently? In other words, could we turn "user agents MUST NOT expose" into "user agents MUST (or SHOULD) log an error (or warning) message"? I cannot help but wonder how many authors out there are actually using validators. Probably not enough. My guess, though, is most of them are looking at the JS Console for warnings. If the WG goal is to stop this authoring, ensuring authors can't miss their error seems like the way to go. |
Playing around with logging a console warning in Chromium just to see how feasible it might be. I think it's pretty feasible. What I've done is:
Some observations on the above approach:
Thoughts? |
Just changing the spec from "must not" to "should not" doesn't seem reasonable to me because it makes the browsers seem non-compliant, when browsers are actually trying to maintain the status quo. More clearly marking it as a deprecation or a shift would make me happier. The more I'm thinking about this, the more I'm convinced that this will break a lot of people if we make this change - quite likely things like automated tests. |
@minorninth Thanks for the input! Having tried to implement name-prohibited in Chromium and seeing everything that was impacted there, I'm afraid I have to agree with your assessment that this change will break a lot, especially for automated tests. In terms of the spec itself, we currently have a "User Agents MUST NOT expose" in 1.3. And we need to decide what to do with it. Do you think we should:
|
Might be sufficient to let validators handle this one. |
We discussed this at TPAC - https://www.w3.org/2022/09/15-aria-minutes.html#t07 |
For 1.3 this needs to be an authors must not only, matching aria 1.2. We need to remove the UAs MUST NOT, and instead add an editor's note about the current reality of how naming prohibited elements is problematic, and that further discussion and changes may occur regarding prohibited naming. |
This was fixed by #1778 |
I'm concerned about the new changes that disallow, e.g. aria-label on HTML elements without a supported role.
As advice to authors, it sounds great. It's probably not ever correct to put aria-label on a
<div>
with no tabindex or role.But I'm concerned about browsers implementing this and enforcing it. Browsers can't just make such a large breaking change like this without carefully understanding the ramifications. We might have to add use counters to see how prevalent this error is, and put a message in the JS Console for 6 months to give developers warning.
And, we don't even know for sure if there aren't more obscure but valid use-cases that would be broken by this. While screen readers largely ignore such names, are we sure that all AT does? What about automated testing tools?
I think we have two possible courses of action:
Flag this as a major change and try to get all browsers onboard with making it slowly and carefully so as not to break anything that users or developers are relying on
Or, maybe we need to introduce something new like an ARIA strict mode, that would let developers opt-in to having this enforced.
The text was updated successfully, but these errors were encountered: