-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Autocomplete] Have the screen reader announce when autocomplete is open and closed #30601
Conversation
Thanks for doing this! Hoping it will make it into the next release? |
👋 The migration PR has been merged. Please follow these steps to make sure that the contents are all updated. (Sorry for the inconvenience)
If you are struggle with the steps above, feel free to tag @siriwatknp |
Thanks for the work! Could you check #25365 and give a quick summary whether this PR fully moves from ARIA 1.1 to 1.2? |
@eps1lon No problem! I can only speak for the two things I changed (adding the combobox role + aria-expanded), but it looks like they both meet the requirements for ARIA 1.2 Namely:
and
|
I think that we should move to the 1.2. pattern fully. Partially moving puts us in a weird spot where we can't rely on tested patterns from the community. |
@eps1lon You mean everything on this page? https://www.w3.org/TR/wai-aria-1.2/ I agree that Autocomplete should be fully compliant, however this PR's goal was to fix the combobox so the screen reader will read the expanded / collapsed state out loud. The current version in production does not do this, so it probably isn't even 1.1 compliant let alone 1.2. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that this implementation follows the spec (https://www.w3.org/TR/wai-aria-1.2/#combobox):
- The
role="combobox"
is set on the input element - The arrow to expand the combobox is a
button
, is focusable, and removed from the document Tab sequence aria-expanded
is placed on the input and represents the state of the combobox- The popup has
role="listbox"
aria-controls
attribute is correctly set on the input
Thanks for your work on this, @EdmundMai!
Fixes: #30369
Problem:
Solution:
role="combobox"
to inputaria-expanded
to input