Problem/Motivation
Both the Chosen and Select2 javascript libraries have known accessibility issues. The Webform module and the Drupal community needs to implement a better UX for tagging and multiple select elements.
@see #2346973: Improve usability, accessibility, and scalability of long select lists
Proposed resolution
Add optional support for Choices.js to the Webform module.
Choices.js is a lightweight, configurable select box/text input plugin. Similar to Select2 and Selectize but without the jQuery dependency and better accessibility.
Remaining tasks
Tasks should mirror #2871606: Add (optional) support for Chosen
- Add choices.js to webform.libraries.yml
- Add #choices property support for select elements.
- Create webform.element.choices.js
- Add choices.js test webform
- Add examples
Notes
- Select2 will be recommended default library.
- Choices integration will be very basic.
User interface changes
Choices.js will now be added to libraries.
API changes
None
Data model changes
N/A
Release notes snippet
TDB
Comment | File | Size | Author |
---|---|---|---|
#8 | 3045944-8.patch | 37.37 KB | jrockowitz |
| |||
#5 | 3045944-5.patch | 29.22 KB | jrockowitz |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedComment #9
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented