Add draft for fixing (aria-)label bug on OcSelect
Description
From my understanding, the OcSelect component currently always gets a hardcoded "Search for option" aria-label, which overwrites the optional label that can be passed as a prop.
I've fixed that by only setting the "Search for option" aria-label if no label is passed via prop.
Another consideration is the visibility of the custom label, for which I added another prop - now, a custom label can be passed but also hidden in the GUI, while still available for screenreader users.
The next step for finalizing this PR (granted that my approach is approved) would be checking all occurances of the OcSelect and decide on whether they need a (hidden) custom label.
Related Issue
- Fixes #10736
Motivation and Context
Accessibility improvements
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.
While I usually like is and has prefixes I don't think they align with the props already present...
I'm not sure it's more elegant, but another approach might be to be able to pass in a label or an aria label... lf no aria label is passed, it uses the regular label. If only the aria label is passed, no label is shown.
No idea if that is a good or a bad thing but it allows to pass in two different values... and it avoids a boolean prop which is not super bad but always smells a bit to me for things like this
While I usually like is and has prefixes I don't think they align with the props already present...
I'm not sure it's more elegant, but another approach might be to be able to pass in a label or an aria label... lf no aria label is passed, it uses the regular label. If only the aria label is passed, no label is shown.
No idea if that is a good or a bad thing but it allows to pass in two different values... and it avoids a boolean prop which is not super bad but always smells a bit to me for things like this
Good idea, let me get started on it!
I've decided to switch the used vue-select library for vs-vue3-select, a fork of a fork that is maintained a little better (the bar is low, though), esp. regarding custom translations which we'll need for the next a11y audit.
I think this has been superseded by https://github.com/owncloud/web/pull/11396.
I think this has been superseded by #11396.
True, thanks for the housekeeping!