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

NVDA doesn't toggle virtual cursor on when focus is moved into an ARIA document inside an ARIA gridcell #12896

Closed
kloots opened this issue Oct 1, 2021 · 8 comments · Fixed by #14611

Comments

@kloots
Copy link

kloots commented Oct 1, 2021

Steps to reproduce:

  1. Open the CodePen example
  2. Press tab to move focus to the first ARIA gridcell in the ARIA grid in the example
  3. With focus on the gridcell press tab to move focus into the ARIA document nested inside the ARIA gridcell. (Focus should be on one of the anchor elements.)

Actual behavior:

When focus moves inside the ARIA document NVDA doesn't automatically toggle the virtual cursor on to allow for object navigation or text to be reviewed within the document to be reviewed.

Expected behavior:

When focus moves inside the ARIA document NVDA should automatically toggle the virtual cursor on to allow for object navigation or text to be reviewed within the document to be reviewed.

System configuration

NVDA version:

2021.2

Windows version:

Windows 10 Home, OS Build 19043.1237

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 NVDA add-ons are disabled, is your problem still occurring?

I don't have any NVDA add-ons installed

@kloots
Copy link
Author

kloots commented Oct 1, 2021

Some additional information the could help. I reviewed this issue with @jcsteh who had this to say:

As to why NVDA is misbehaving here, you're hitting a bug/quirk with regard to browse mode focus handling. NVDA has logic to ignore focus changes for the purposes of browse mode if the focus overlaps with the previous cursor position. This is done to avoid spurious mode switches or cursor bouncing where focus is set to one thing and ends up being bounced to a descendant; e.g. if you focus a list box, focus might get bounced to a child list item. If the focus was set due to cursor movement, NVDA doesn't want to snap into focus mode in that case. I think they've tried to replace that logic a few times and run into problematic edge cases. Fixing it will be a bit tricky because of potential regressions and edge cases, but I don't think it should be a multi month project or anything like that.

@jcsteh also suggested a partial workaround:

FWIW, you can partially work around it by ensuring there's something before the first focusable element in the gridcell. For example:

<div role="grid"><div role="row"><div role="gridcell" tabindex="0">&nbsp;<div role="document"><a href="https://example.com">bar

The non-breaking space is the key here. When you tab to the link, it should switch to browse mode. Unfortunately, shift+tabbing back to the cell doesn't switch back to focus mode and I can't think of a way to work around that one.

@kloots
Copy link
Author

kloots commented Oct 2, 2021

One other piece of context for this issue: this change is needed to support a change we are making to Slack.

@feerrenrut
Copy link
Contributor

Related / same cause: #12891

@kloots
Copy link
Author

kloots commented Oct 4, 2021

Ah, good to know @feerrenrut. For planning on the Slack side: by chance you do you a sense for how long it'll take to fix this issue?

@michaelDCurran
Copy link
Member

We tried to address issues such as this in pr #8869 though that had to be reverted after due to unrelated focus changes being announced in Firefox (most likely to do with CSS reframing). It is believed this is no longer a problem. So we should again look into the ideas in that pr. However, much of what we are trying to protect here is only necessary when NVDA's Automatically set system focus to focusable Elements setting is turned on. As it has been off by default for some time now, it may be a good point in time to remove that setting and any code that was there to specifically filter out announcing focus due to this setting being on.
There are quite a lot of use cases that would need to be tested when fiddling with this particular code, so is not an insignificant change to make.
We could probably put asside some time to at least do some initial investigation on this in the next few weeks, but cannot promis a specific date for when we could fully address this.

@kloots
Copy link
Author

kloots commented Oct 8, 2021

Got it. Thanks for the additional context @michaelDCurran. As I mentioned earlier, @jcsteh suggested we could partially work around this by placing a non-breaking space before the ARIA document. But he also indicated that hack wouldn't solve NVDA switching back when using shift + tab. IF there is a hack you can think of that would get us by as you work through this on your end, please let us know.

@kloots
Copy link
Author

kloots commented Jan 7, 2022

@michaelDCurran curious if there's an update on this issue?

@kloots
Copy link
Author

kloots commented Jan 11, 2022

@feerrenrut or @jcsteh any idea of there's an update on this issue?

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