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] no-redundant-roles: Refine implicit role of select to include combobox scenarios #1027

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

lb-
Copy link
Contributor

@lb- lb- commented Oct 23, 2024

Encode implicit roles for select elements based on roles defined in https://www.w3.org/TR/html-aria/#el-select

  • select (with a multiple attribute or a size attribute having value greater than 1) will have the implicit role 'listbox'
  • select (with NO multiple attribute and NO size attribute having value greater than 1) will have the implicit role 'combobox'

Fixes #949

…de `combobox` scenarios

Encode implicit roles for `select` elements based on roles defined in https://www.w3.org/TR/html-aria/#el-select

- `select` (with a multiple attribute or a size attribute having value greater than 1) will have the implicit role 'listbox'
- `select` (with NO multiple attribute and NO size attribute having value greater than 1) will have the implicit role 'combobox'

Fixes jsx-eslint#949
@ljharb ljharb marked this pull request as draft October 25, 2024 22:16
@lb- lb- force-pushed the fix/949-implicit-role-select branch 2 times, most recently from bdc1cf4 to 59f4396 Compare October 27, 2024 04:49
@lb- lb- requested a review from ljharb October 27, 2024 04:53
src/util/implicitRoles/select.js Outdated Show resolved Hide resolved
@ljharb ljharb marked this pull request as ready for review October 27, 2024 05:28
@ljharb ljharb force-pushed the fix/949-implicit-role-select branch from 59f4396 to d13725d Compare October 27, 2024 05:29
@ljharb ljharb changed the title [fix] Refine implicit role of select to include combobox scenarios [Fix] no-redundant-roles: Refine implicit role of select to include combobox scenarios Oct 27, 2024
@ljharb ljharb merged commit d13725d into jsx-eslint:main Oct 27, 2024
112 checks passed
@lb- lb- deleted the fix/949-implicit-role-select branch October 27, 2024 07:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implicitRoles/select.js: implicit role is now "combobox"
3 participants