Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

Fix: make country code button a combobox - #3

Merged
sm-deployer merged 1 commit into
v5.0.7from
fix-accessibility
Nov 11, 2022
Merged

Fix: make country code button a combobox#3
sm-deployer merged 1 commit into
v5.0.7from
fix-accessibility

Conversation

@VladyslavBondarenko

@VladyslavBondarenko VladyslavBondarenko commented Nov 11, 2022

Copy link
Copy Markdown

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
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants