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: select combobox role #1219

Merged
merged 7 commits into from
Jul 9, 2020
Merged

fix: select combobox role #1219

merged 7 commits into from
Jul 9, 2020

Conversation

jacobdevera
Copy link
Contributor

@jacobdevera jacobdevera commented Jul 6, 2020

Description

The W3C recently created an example for select-only comboboxes, which is used for inspiration

  • Use role combobox to support aria-readonly
  • aria-haspopup should be listbox

Deviations

  • Not using aria-activedescendant; instead our markup is meant to support a roving tabindex for focus management which is functionally equivalent
  • Not using aria-labelledby; our documentation features the Select in isolation. This attribute would be used in tandem with a form label

Testing

  • JAWS + Chrome / IE

Known Issue

Please check whether the PR fulfills the following requirements

@jacobdevera jacobdevera added the A11y Accessibility concerns or improvements label Jul 6, 2020
@jacobdevera jacobdevera requested review from meganaconley and a team July 6, 2020 21:26
@jacobdevera jacobdevera self-assigned this Jul 6, 2020
@netlify
Copy link

netlify bot commented Jul 6, 2020

Deploy preview for fundamental-styles ready!

Built with commit 4182325

https://deploy-preview-1219--fundamental-styles.netlify.app

Copy link
Contributor

@InnaAtanasova InnaAtanasova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good but you can no longer open the menu when clicked on the button (except the first example which works)

@prsdthkr
Copy link
Member

prsdthkr commented Jul 7, 2020

Should we move the popover ids from <div> to <ul>? The WAI-ARIA v1.2 specification for combobox role says:

Authors MUST ensure the popup element associated with a combobox has a role of listbox, tree, grid, or dialog. Authors MUST set aria-controls on a combobox element to a value that refers to the combobox popup element.

@jacobdevera
Copy link
Contributor Author

jacobdevera commented Jul 7, 2020

Should we move the popover ids from <div> to <ul>?

I added an id to the listbox and set aria-controls accordingly, but the id for the popover is still needed for triggering the open/close

@jacobdevera jacobdevera requested a review from InnaAtanasova July 8, 2020 17:48
@jacobdevera jacobdevera merged commit 52cd733 into master Jul 9, 2020
@jacobdevera jacobdevera deleted the fix/select-combobox branch July 9, 2020 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11y Accessibility concerns or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants