inveniosoftware / react-searchkit

React component library for interacting with a REST API.
https://inveniosoftware.github.io/react-searchkit/
MIT License
78 stars 40 forks source link

Update dropdowns for a11y #222

Closed lhenze closed 2 years ago

lhenze commented 2 years ago

Adds "selectOnNavigation=false" to not submit each option as keyboard-only user navigates among them with the down arrow Adds aria-labels for screenreaders

closes https://github.com/inveniosoftware/react-searchkit/issues/220

:heart: Thank you for your contribution!

Description

Please describe briefly your pull request.

Checklist

:rotating_light: Please review the guidelines for contributing to Invenio.

Green light on all GitHub Actions status checks is required in order to merge your PR. Check your code additions will fail neither code linting checks nor tests and will not decrease test coverage.

External contributors

Copyright

See copyright and license policy for details.

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

If you ticked all the boxes above, you're good to go! :rocket:

lhenze commented 2 years ago

I think adding translations isn't possible yet: depends on https://github.com/inveniosoftware/react-searchkit/issues/223

lhenze commented 2 years ago

Hi, moved to pending review, question is, how essential to provide translations for default props?

ntarocco commented 2 years ago

I think we don't have translations support at the moment in RSK, but we should indeed have! I think that @mb-wali was doing some work to move the i18n core features in some reusable modules, then we could add it here too... Ping @zzacharo

lhenze commented 2 years ago

Hi @ntarocco, thanks, I made the change ... selectOnNavigation is now a property, defaulting to false, for the four components.