SimpleSingleSelect component #357
kabaros
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
A new component SimpleSingleSelect was added to the UI library. This component provides an accessible version of SingleSelect component that follows the patterns and recommendations in ARIA APG including recommendations for keyboard navigation and aria attributes.
Eventually the SingleSelect component will be marked as deprecated, and removed, so we encourage you to start using the new component (and report any issues).
This work is part of the accessibility initiative, and there should be follow up tickets to handle MultiSelect and SimpleTransfer.
Why a new component?
It was not possible to update the existing component to be accessible without having breaking changes, and we deemed the impact of these changes to be too big and disruptive. The main reason for updating the existing component in a backwards-compatible way is that it was too flexible and accepted any elements as children. This made it inherently inaccessible. The new component is more restricted in what you can pass, in return of much better accessibility.
For most cases, it should be easy to move to the restricted input format. If you have a use case that the new component doesn't cater for, it might be an indication that you UX should be changed, or a limitation of the new component that we'll be happy to address.
For an example of a migration to the new component, check the Capture app PR here: https://github.com/dhis2/capture-app/pull/3992/files#
This component was developed by Jan-Gerke, and more context and discussions can be found in the PR and this note.
Beta Was this translation helpful? Give feedback.
All reactions