-
-
Notifications
You must be signed in to change notification settings - Fork 57
Improve accessibility of the interests select box #750
Conversation
e425a2e
to
e6c20fe
Compare
Sorry it's taken me a bit to get to this, @WilHall. Would you like to pair on it next Friday? The code itself looks good at first, but I'd love to check it with NVDA. |
@ericwbailey Yes definitely! That would be very helpful; if we have time, I think it would be worthwhile going over some of the other combobox options as well to see if we want to pivot our strategy there -- now that I have a better idea of how this area of code works I'm hoping the switch to different libraries won't be too painful. |
d1aee34
to
1b45927
Compare
@ericwbailey do you think this PR is something we can recover or is this too stale and we should close it? I see it has a few conflicts that need to be resolved, and I could try to resolve them, but I'm not sure how close to the finish line this was. Is it worth putting in the effort to keep it going or should we close it? |
@germsvel I am unsure how close it was. I have a lot of trust in Wil's work, but it's been awhile. Maybe we can pair on it? |
👋 Most of the work here was the migration from Given that it's pretty stale with conflicts, it might be better to start from scratch and use this as a reference as you encounter migration issues. |
@ericwbailey in the future if you're still interested in this we could pair through it. I'm going to close this PR as it's almost 2 years old |
Fixes #724.
Background
Accessible custom selects are hard to come by. webaxe has a good list of accessible options but none of them provide the multi-select tag input we have today for interests.
The jQuery plugin that we use for the interests select, selectize.js has poor accessibility for keyboard navigation and screen readers (see discussions selectize/selectize.js/issues/798 selectize/selectize.js/issues/349) and on top of that, maintenance on the library is lacking. SLMNBJ/selectize-plugin-a11y makes some improvements to this, but doesn't really improve the experience for the mode of selectize we are using (the tag input).
Selectize has a unique API, so while there is no drop-in replacement, the closest is select2 which unfortunately also has poor accessibility (see this open issue: select2/select2/issues/3744 and the discussion: wpaccessibility/select2-a11y/issues/1). There is a fork of select2 (woocommerce/selectWoo) which is not perfect (see this issue: woocommerce/woocommerce/issues/16003) but is nonetheless a better experience.
This PR
In this PR, I focused on two things:
selectize
withselectWoo
I think these changes are a step in the right direction because:
selectize
selectWoo
is a fork ofselect2
, so it's a drop-in replacement; there is an active effort to makeselect2
more accessible, and it would be painless to switch to it fromselectWoo
if/when that happensAlternatives
selectize
has not been maintained for quite some timeTesting
You can test using Voiceover on the selectWoo demo compared to the default select2 demo.
The below GIFs demonstrate the improvements to the preview of who is subscribed to the selected interests.
Navigating with TAB
Navigating with VO + → / VO + ←