Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableToolbarSearch does not add aria-label for accessibility #4665

Closed
2 tasks done
aniruddhj opened this issue Nov 12, 2019 · 3 comments · Fixed by #5330
Closed
2 tasks done

TableToolbarSearch does not add aria-label for accessibility #4665

aniruddhj opened this issue Nov 12, 2019 · 3 comments · Fixed by #5330
Assignees

Comments

@aniruddhj
Copy link

What package(s) are you using?

  • carbon-components
  • carbon-components-react

Detailed description

The TableToobarSearch within the DataTable does not add/provide with an aria label. This is causing accessbility violations in our accessbility tool. Currently the work around is add an aria label attribute once the DataTable component is mounted and there doesn't seem to be any other way.

Steps to reproduce the issue

  1. Inspect the Search bar element
  2. Under the <div class='bx--toolbar-action..> no aria-labels are displayed

Please create a reduced test case in CodeSandbox

Additional information

  • Screenshots or code
    Screen Shot 2019-11-12 at 3 13 57 PM

  • Current work around by setting the attributes inside ComponentDidMount
    Screen Shot 2019-11-12 at 3 36 02 PM

@abbeyhrt
Copy link
Contributor

Hi @aniruddhj 👋 Thanks for making this issue! The search magnifying glass is purely decorative and should not have an aria-label. I am not getting any violations with DAP for the TableToolbarSearch. What accessibility tool are you using? I believe that the prop labelText is labelling the search input and therefore TableToolBarSearch wouldn't need an aria-label but I could definitely be mistaken.

@aniruddhj
Copy link
Author

aniruddhj commented Feb 10, 2020

@abbeyhrt I am using DAP for checking all the violations and I agree the magnifying glass is for decorative purpose. But the issue mentioned here #5289 (comment) is some what the same error I get in my DAP tool. I do see the label Filter Table but that doesn't seem to help with the violation I get and I am confused why you were not able to see the same violation.

@abbeyhrt
Copy link
Contributor

@aniruddhj thank you for your input! I just made a PR that will adjust the TableToolbarSearch component so that it is labeled by the labelText prop so that should resolve the DAP violations you are experiencing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants