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

[select] fix: set aria-disabled attribute on combobox elements #5978

Conversation

bvandercar-vt
Copy link
Contributor

Disabled prop should be applied to the element that has role="combobox", not just the input.

@adidahiya
Copy link
Contributor

According to MDN:

The disabled attribute is supported by <button>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>.

So it sounds like it's not valid on <div> or <span> elements... do you have any documentation to support this change?

@bvandercar-vt
Copy link
Contributor Author

According to MDN:

The disabled attribute is supported by <button>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>.

So it sounds like it's not valid on <div> or <span> elements... do you have any documentation to support this change?

Ah, you're right. I thought changing via role="combobox" would allow disabled. But this documentation says:

image

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-disabled

Switched to aria-disabled.

@bvandercar-vt bvandercar-vt changed the title feat(select2/multiselect2): disabled prop on select and multiselect combobox element feat(select2/multiselect2): aria-disabled prop on select and multiselect combobox element Feb 28, 2023
@adidahiya adidahiya changed the title feat(select2/multiselect2): aria-disabled prop on select and multiselect combobox element [select] fix: set aria-disabled attribute on combobox elements Feb 28, 2023
@adidahiya adidahiya merged commit 9cd1db2 into palantir:develop Feb 28, 2023
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.

2 participants