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
checkboxes with "role=switch" should not require attribute "aria-checked" #1221
Comments
MDN isn't a specification; https://w3c.github.io/aria/ is a relevant specification. You indeed don't need to set any ARIA attributes on a vanilla checkbox. But you're setting the Do you have argument based on the actual spec text? |
yes this seems to be a shortcoming of the validator, as you don't need https://www.w3.org/TR/html-aria/#docconformance
|
<input class="form-check-input" type="checkbox" role="switch" id="flexSwitchCheckDisabled" disabled> At https://w3c.github.io/aria/#switch the ARIA spec says that So the checker is conforming to ARIA spec on that requirement.
As far as I can see, using role= But it’s quite possible there’s some language somewhere in the ARIA spec that makes such an exception. If so, I’d be glad for somebody to provide a citation here. Otherwise, without that, as far as I can see the only way for authors to reconcile with both the ARIA spec requirements and ARIA in HTML spec requirements would be to not use In other words, short of either getting some spec citation/clarification, or else an actual spec update being made, there’s no change I can make here without violating the conformance requirements of the ARIA spec. |
my take here is that the ARIA spec just didn't consider the possibility of |
From the note in 5.2.2 Required States and Properties and 5.2.3 Supported States and Properties
Additionally, from https://www.w3.org/TR/wai-aria-1.2/#implicit_semantics, emphasis mine.
As an From 8.5 Conflicts with Host Language Semantics:
This all relates to issue #1122 |
OK, thanks — I remember this now. So given that, I’ll make an update to not require |
@sideshowbarker was this fixed in 2021.9.2? We no longer get the failures in the upstream PR twbs/bootstrap#34824 but I didn't see any commit or message that this was fixed. |
I have made no fix for it that I can recall — so if it’s not still causing an error somewhere that it did before, I don’t have an explanation about why that’d be. |
Yeah, I don't get it either but we no longer get the errors for some reason... |
@sideshowbarker so, I confirmed it. Going back to 21.6.11 results in the errors, but using 21.9.2 works fine without any errors. So, this was fixed somewhere along the way it seems. |
Maybe it was 1214126 that fixed it? Either way, I guess you can close this issue since it doesn't happen with the latest version :) |
Seems so, yeah. That was quite a while ago. I guess what confused me was that this issue was filed only a few days back. But I suppose that was probably because it was being tested against the previous NPM package, or something. Anyway, I’m glad to know we’ve already got it working according to the spec requirements |
You released a new stable npm version only a week ago that's why :) |
I made a PR on the Bootstrap site to add role="switch" to the switch components but the validation tests fail.
I think that checkboxes with "role=switch" should not require attribute "aria-checked" according to: https://developer.mozilla.org/en-US/docs/Web/API/Element/ariaChecked
The text was updated successfully, but these errors were encountered: