-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add aria-multiselectable #1726
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
base: master
Are you sure you want to change the base?
Add aria-multiselectable #1726
Conversation
👷 Deploy request for vueselect accepted.
|
|
If you could add a test for the attribute value here we can get this one released. Thanks for the efforts! |
e082b2c to
3d17871
Compare
|
Tests added! |
src/components/Select.vue
Outdated
| if (this.multiple) { | ||
| return this.isOptionSelected(option) | ||
| } | ||
| return index === this.typeAheadPointer ? true : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my original functionality here was actually incorrect. I was using aria-selected to denote that the option is currently highlighted, but after rereading the docs, it should be used to denote the current selection. I think it should probably be this.isOptionSelected in all cases.
Let me know if you think I'm incorrect there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and updated!
Also converted the boolean to string to match the docs https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected#values (otherwise false would omit the attr and make it seem unselectable) with updated tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look good now @sagalbot?
b5f38fe to
882e42d
Compare
- Implemented as described in the MDN docs: - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-multiselectable - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected Signed-off-by: Christopher Ng <[email protected]>
882e42d to
5e1fad0
Compare
|
Hi @sagalbot , |
Enhance component accessibiltiy as described in the MDN docs: