nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.1k stars 634 forks source link

Auto browse mode turns off in a grid when focus lands on a checkbox #11413

Open arodenbeck opened 4 years ago

arodenbeck commented 4 years ago

This is similar to issue: 8395 https://github.com/nvaccess/nvda/issues/8395

This deals with checkboxes rather than buttons however.

Steps to reproduce:

My situation also involves a checkbox that is not being toggled while in browse mode. I am trying to create an example which is not behind a login, and I will update this issue when I am able to make that happen. The above grid does not seem to have any issue checking or unchecking in browse mode, but it does exhibit the switching behavior.

System configuration

NVDA installed/portable/running from source:

Installed from the downloadable executable

NVDA version:

2020.1

Windows version:

Windows 10.0.19041 Build 19041

Name and version of other software in use when reproducing the issue:

Chrome: 84.0.4147.89 (Official Build) (64-bit)

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

No

If addons are disabled, is your problem still occuring?

Yes

Did you try to run the COM registry fixing tool in NVDA menu / tools?

No

Adriani90 commented 1 year ago

@arodenbeck thanks you for reporting. this issue is somehow also reproducible in Firefox, though it is not as bad as Chrome. I am not sure why NVDA moves the focus off the grid when in focus mode and moving with arrow keys.

cc: @jcsteh maybe you have some suggestions here.

jcsteh commented 1 year ago

If I force focus mode with NVDA+space, I can't reproduce this. Pressing enter to switch the grid's mode and them moving around the grid with arrow keys remains in focus mode. This is because switching to focus mode with NVDA+space forces focus mode until otherwise requested by the user.

If I don't force focus mode with NVDA+space and I instead let it automatically switch by tabbing into the grid, focusing a check box will switch back to browse mode. This is currently expected behaviour; check boxes are considered to be a control which does not require focus mode, as are buttons and links.

That said, while this is not my decision to make, it's probably reasonable to argue that since gridcells are meant to be interactive and grids manage focus, any control inside them should also be considered interactive and thus remain in focus mode. If implemented, this should only apply to gridcell and not any other kind of cell. If that were going to be done, I'd suggest reopening #8395, broadening its scope to cover buttons and closing this one as a duplicate.

joppekroon commented 1 year ago

I'm currently running into the same issue. In contrast to the given example I'm placing focus on the top left cell which happens to contain a "select all" checkbox, thus triggering the issue immediately. I'm not sure if that is the best approach for users, however, regardless what the first focused cell is, if it contains a checkbox (or similar) and focus is placed on that element according to the APG grid pattern advice, it triggers browse mode right away which feels extra confusing to me?

While a user can navigate the grid in browse mode with standard reading and table navigation controls, the grid code then has an outdated notion of the location of the user. I fear that this may mean that when a user uses additional grid keystrokes, e.g. space to select the row, they'll inadvertently apply them to the wrong location (since the 'focus' is still elsewhere according to the code).

Comparing with JAWS, they do keep passing the keys to the JavaScript code so grid navigation works even when focus is placed on a checkbox inside the gridcell.

I can understand that a user may want to drop into browse mode, but I feel that it would be more understandable to use NVDA+Space to get to the browse mode deliberately (at which point I feel it is reasonable for the user to expect some funkyness with the grid), than the current situation where you have to use NVDA+Space to restore the intended application mode that has been turned off automatically.

Now, I am not a daily screen reader user, so I appreciate I might be making a mountain out of a molehill here. So, is this simply something that actual NVDA users have no problem with? Are they all completely comfortable with the NVDA+Space shortcut, and would they know to use it in this case to make the grid work as intended?

joppekroon commented 1 year ago

I've just been playing around with the datatable from Clarity, and I noticed that this issue does not appear there.

Edit: On closer inspection, this issue does appear in the datatable from Clarity. The difference is that the initial focus goes to the "select all" checkbox cell, where it is placed on the cell instead of the checkbox. Because focus doesn't land on the checkbox in that case NVDA uses application mode. Once you navigate to a body checkbox cell, NVDA drops into browse mode.

Adriani90 commented 1 year ago

I think this is quite crucial to solve in NVDA at some point since for example concept boards like Miro will focus on such grid structures when making their application accessible. I imagine it could be a pain trying to navigate through an accessible concept board and jumping to browse mode again and again. It seems as of now the only way to make NVDA stay in focus mode reliably is to turn off the setting "switch to browse mode when the page loaded" in NVDA browse mode settings. However, this would affect the whole browsing experience.

I suggest to kind of force NVDA to stay in focus mode what ever happens when pressing NVDA+space bar, until the page is refreshed or a new page is loaded. In Chrome for example NVDA jumps to browse mode even when I enable focus mode explicitely with NVDA+space bar. It's not truely related to grids, but you can reproduce the same issue in #12983.

I think the automatic switch to focus mode and browse mode is a quite fragile feature, it might be worthy to let the user decide when it is appropriate to swich between these navigation modes. We see alot of situations where NVDA automatically switches to browse mode where it shouldn't even in applications like slack or Microsoft Teams.