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

Data grid keyboard navigation examples get 'stuck' on links and can't navigate beyond them #3208

Closed
mattparker opened this issue Jan 3, 2025 · 3 comments

Comments

@mattparker
Copy link

I think this may be a browser issue but I can't find any reports of it anywhere.

In the simple example at https://www.w3.org/WAI/ARIA/apg/patterns/grid/examples/data-grids/#ex1_label

  1. Click on the first data cell "01-Jan-16"
  2. Press Arrow right
  3. Focus moves to the second column
  4. Press Arrow right
  5. Focus moves to the third column which contains a link. The link receives focus.
  6. Press Arrow right (or any other arrow key).
  7. Nothing happens - focus remains on the link.

This happens on Edge 131 and Firefox 133 on Windows. It happens on the Codepen version, and variations of it on other examples.

Any interactive element like a button in the table cell does not, as far as I can tell, allow keydown events to bubble beyond the element and so focus can't be moved to other cells.

I also don't think that arrow key events are being fired on the elements like links or buttons (although e.g. a <select> does seem to where up and down have some natural meaning).

(apologies in advance if this is not the best place for this type of issue. I have searched elsewhere and come up with nothing).

@JAWS-test
Copy link

I can't reproduce the problem you describe (with Firefox, Edge and Chrome), hence my question as to whether you might be using a screen reader. It could be a bug in a screen reader that causes the screen reader to switch from form mode (which enables arrow key navigation) to reading mode (because not the gridcell with link receives the focus, but the link itself)

@mattparker
Copy link
Author

@JAWS-test thank you - yes that's it - NVDA - I will raise with them.

@JAWS-test
Copy link

@mattparker

I was able to reproduce the problem with NVDA. It does not occur with JAWS. The problem actually occurs because NVDA is only in form mode as long as a gridcell has the focus. As soon as an element within the gridcell, which normally causes reading mode, receives the focus, NVDA switches to reading mode. I don't think the ARIA specification says anything specific about how screen readers should behave when elements within the gridcell receive focus. Therefore you are welcome to submit a ticket to NVDA (https://github.com/nvaccess/nvda/issues), at the same time I would like to ask you to open the ticket here again, because the ARIA WG should discuss whether a screen reader must always remain in form mode with a gridcell. What if the gridcell contains text and I switch to edit mode with F2: There I would expect to be able to read the text content without receiving focus with the keyboard. That's why NVDA's decision to switch to reading mode when focussing on a link is not necessarily far-fetched.

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

No branches or pull requests

2 participants