react-spectrum
3aa6dbe3 - #3578 Add the ability to add a data attribute to <HiddenSelect /> to handle false a11y positives (#4759)

Comment changes are shownComment changes are hidden
Commit
1 year ago
#3578 Add the ability to add a data attribute to <HiddenSelect /> to handle false a11y positives (#4759) * Add option to add data attribute to hidden select This allows to use the data attribute as a reference for other tools to ignore a11y issues. * Add the ability to add a data-attr to handle a11y false positive This solves #3578 Some tools such as AXE or pa11y might give false positive on hidden select. This add a new prop to expose a data-attribute (dataset) that can be used to ignore these false positives. * Improve grammar, fix typos * Make the aria-rs-a11y-ignore attribute always available There is no harm in making this available, as discussed in the PR review. * Fix docs building issue This fixes an issue in the docs where the component was being parsed when it shouldn't have been parsed. * Update packages/@react-aria/select/docs/useSelect.mdx * Update packages/@react-aria/select/src/HiddenSelect.tsx * Update packages/@react-aria/select/src/HiddenSelect.tsx * Update packages/@react-aria/select/test/HiddenSelect.test.tsx * Move data attribute to container and add ignore rule to storybook axe * Update storybook selector Co-authored-by: Michael Jordan <michael@majordan.net> * updating aria-attribute * fix tests --------- Co-authored-by: Aloys Berger <alo@reaktive.com> Co-authored-by: aloys <17796338+abitbetterthanyesterday@users.noreply.ithub.com> Co-authored-by: Reid Barber <reid@reidbarber.com> Co-authored-by: Daniel Lu <dl1644@gmail.com> Co-authored-by: Daniel Lu <danilu@adobe.com> Co-authored-by: Michael Jordan <michael@majordan.net> Co-authored-by: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Co-authored-by: Kyle Taborski <ktabors@yahoo.com>
Author
Parents
  • .storybook
    • File
      preview.js
  • packages/@react-aria/select
    • docs
      • File
        useSelect.mdx
    • src
      • File
        HiddenSelect.tsx
    • test
      • File
        HiddenSelect.test.tsx