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

Improve BasicTable checkbox aria-label text #2337

Closed
alisonelizabeth opened this issue Sep 12, 2019 · 3 comments
Closed

Improve BasicTable checkbox aria-label text #2337

alisonelizabeth opened this issue Sep 12, 2019 · 3 comments
Assignees

Comments

@alisonelizabeth
Copy link

Currently, when selection is defined, the BasicTable component adds an aria-label to each checkbox per row with the text: "Select this row".

<EuiI18n token="euiBasicTable.selectThisRow" default="Select this row">

Ideally, this text would provide more context for screenreaders.

Suggested text from @barlowm:

"Select the <name_of_row> row."

Related issue: elastic/kibana#43842

@cjcenizal
Copy link
Contributor

This might be resolved by #2335. That issue notes the need to be able to specify an "identifying cell" per row, by adding a <th scope="row">.

If we do this for each row in a table, then the checkbox in that row may not need any identifying information in its aria-label. For example, if it has aria-label="Select row" then I believe the screen reader would announce the content of the <th scope="row"> cell and then "Select row", thus allowing the user to associate the checkbox with the row they're in.

@cjcenizal
Copy link
Contributor

@barlowm Could you please confirm the above?

@myasonik
Copy link
Contributor

Not Mike but I can tag in here maybe.

In my experience testing tables, the short answer is "it depends" so I'd stick with having the info there (and as long as it's not the first thing that's read out, it shouldn't be intrusive either).

Depending on how the user navigated to the cell and on the environment (browser, screen reader, OS, etc) they're running, exactly what's read out will be different so providing context at the closest point of interaction is often the most helpful.

If you wanted to, you could move the identifying bits to an aria-describedby if that's technically easier and should provide similar levels of coverage while also demoting that info to a lower level of priority for the user.

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

No branches or pull requests

5 participants