Skip to content
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

Fix: make country code button a combobox #3

Merged
merged 1 commit into from
Nov 11, 2022
Merged

Conversation

VladyslavBondarenko
Copy link

@VladyslavBondarenko VladyslavBondarenko commented Nov 11, 2022

This is a fix for #2.

From the discussion in #100143:

I don’t think the combobox pattern suits well for this input because this number input doesn’t control the dropdown (doesn’t open or close it and the options shown in the dropdown don’t depend on the input value).
I would skip adding type="combobox" to the input. Could you please comment on whether it is ok?

The country code element should still have role="combobox" in this case. This role communicates that the component will open a listbox, and is included in the ARIA Design Pattern for a Select-Only Combobox, which seems to match what you describe.

I should have asked this before the merge.

Also fixes broken tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have used ESLint & Prettier to follow the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This is a fix for #2
The country code button should still have role="combobox".
This role communicates that the component will open a listbox.
This is the case of a Select-Only Combobox
https://www.w3.org/WAI/ARIA/apg/example-index/combobox/combobox-select-only.html

Fix broken tests
@VladyslavBondarenko
Copy link
Author

!merge

@sm-deployer sm-deployer merged commit 1709701 into v5.0.7 Nov 11, 2022
@sm-deployer sm-deployer deleted the fix-accessibility branch November 11, 2022 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants