-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Accessibility: list in nested options #5915
Comments
The recommendations are fun on this aspect, because in ARIA 1.1 they did not have a concept of "groups" at all. This was only added in ARIA 1.2 after it was pointed out that Per ARIA 1.2 docs on
You have correctly identified that the children of a Unfortunately the example given for
It's not immediately clear why this is an acceptable fix, other than because it resets the default role on the |
This is indeed somewhat unclear in the specification, as you say. It requires that the Regarding
This means, that adding To demonstrate, here is Firefox' accessibility tree without |
The visual with the accessibility tree helped here (didn't realize that existed, but it makes sense). I've merged it in so it will be included in the upcoming 4.1.0 release. Thanks a lot for the explanation and the PR! |
Hello,
When using nested options (
<optgroup
>), a<ul>
item gets added to contain the options.However, this does conform to WCAG, as the
group
inside of alistbox
only may contain elements with anoption
role.select2/src/js/select2/results.js
Lines 236 to 238 in ef33f4b
This can be fixed by giving the
<ul>
arole='none'
, as then it is ignored.I would be open to writing a PR to fix this.
The text was updated successfully, but these errors were encountered: