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

DataTable: Provide screen reader compliant keyboard navigation #11783

Closed
Tracked by #11251
Rene-Stoeckel opened this issue Apr 19, 2024 · 12 comments · Fixed by #11975
Closed
Tracked by #11251

DataTable: Provide screen reader compliant keyboard navigation #11783

Rene-Stoeckel opened this issue Apr 19, 2024 · 12 comments · Fixed by #11975
Assignees
Labels
accessibility WCAG or ARIA related issues sponsoring required This issue requires financial sponsoring through PrimeTek PRO support
Milestone

Comments

@Rene-Stoeckel
Copy link

Description

One can use the keyboard to navigate between the rows by using the up and down
arrow keys once the focus is moved from the table headers to the table body,
as demonstrated in the showcase here:

http://www.primefaces.org:8080/showcase/ui/data/datatable/lazy.xhtml

But this approach is insufficient in combination with screan readers (e.g. JAWS)
and thus is a serious accessibility limitation.

The problem is that the data tables are given the aria role "grid" so that
screen readers expect the "W3C Pattern Grid Interactive Tabular Data" (see below)
and expect the table to be navigated via the cursor keys from row to row and from cell to cell
similiar to excel, which is not implemented.
The focus currently stays on top on tbody instead of the "cells" so that the screen
reader does not read anything from the table content during navigation.

Describe the solution you would like

  1. It would be nice to have an implementation of table navigation from row to row and cell to cell
    via cursor keys/ home / end / page up / page down according to the example in the WAI Pattern:
    https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/data-grids/

  2. Instead of staying on tbody the keyboard focus would need to follow the cursor
    so that the screen readers will read the cells content.

Additional context

This is the heaviest finding in the acessibility assessment of our primefaces application.

Thank you for your great work on primefaces!

@Rene-Stoeckel

This comment was marked as off-topic.

@melloware melloware added accessibility WCAG or ARIA related issues and removed new feature ‼️ needs-triage Issue needs triaging labels Apr 19, 2024
@melloware

This comment was marked as off-topic.

@Rene-Stoeckel

This comment was marked as off-topic.

@melloware

This comment was marked as off-topic.

@melloware melloware added the sponsoring required This issue requires financial sponsoring through PrimeTek PRO support label May 3, 2024
@melloware
Copy link
Member

@Rene-Stoeckel i moved this ticket under sponsoring required: #11251

@melloware melloware reopened this May 9, 2024
@melloware
Copy link
Member

@Rene-Stoeckel i sent you an email.

@melloware melloware self-assigned this May 9, 2024
@Rene-Stoeckel
Copy link
Author

@Rene-Stoeckel i sent you an email.

Alright, thank you, I've answered it.

@melloware
Copy link
Member

@Rene-Stoeckel another email sent do you not check your email regularly?

@melloware
Copy link
Member

@Rene-Stoeckel please have your team test out this reproducer:
pf-11918.zip

Unzip and run mvn clean jetty:run and navigate to: http://localhost:8080/

Now cells are focuses and you can use Arrow keys and all of the keystrokes mentioned in the doc to navigate the cells and screen reader should read them.

image

datatable-navigation

@melloware melloware added this to the 14.0.1 milestone May 16, 2024
@Rene-Stoeckel
Copy link
Author

We just tested the reproducer (from 11918) with the screenreader and we can confirm that

  1. the content of the table is correctly presented with the screenreader, just as expected.
  2. cursor navigation is working as expected,

But there are things we noticed that still must be fixed here:

When a cell other than (1,1) is clicked with the mouse the cursor navigation is broken. The fokus travels to a different cell than expected and some cells can no longer be reached. E.g. select cell New York, navigate all way down and then all way up (cursor or page down/up) and the fokus will end up in cell 123.

@melloware
Copy link
Member

Try this one:
pf-dt-accessibility.zip

@Rene-Stoeckel
Copy link
Author

Thank you very much for the quick response. We tried this tester and the two issues are fixed. Screenreade and cursor navigation are as expeced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility WCAG or ARIA related issues sponsoring required This issue requires financial sponsoring through PrimeTek PRO support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants