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

Bug: Opening an HTML dialog nested in a shadow root more than once causes controls inside it to become non-clickable #17398

Open
mra11yx opened this issue Nov 13, 2024 · 2 comments
Labels
app/chrome blocked/needs-external-fix p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@mra11yx
Copy link

mra11yx commented Nov 13, 2024

Steps to reproduce:

  1. Open https://codepen.io/mra11yx/pen/VwoRwKq (forking this and opening in debug mode would be ideal) in either Chrome or Edge.
  2. Navigate to the "example 2 (dialog inside shadow root)" button with NVDA running, and activate it
  3. Close the dialog
  4. Reopen it and observe that the close button can no longer be activated
  5. Observe that this does not occur in example 1, which is fully in the light DOM.
  6. Attempt to reproduce this in Firefox and observe that the issue does not occur.

Actual behavior:

Nesting a native HTML dialog in a shadow DOM root causes buttons inside the dialog to be no longer clickable in NVDA if the dialog has been closed and then reopened. This occurs in Edge and Chrome, but not Firefox.

I believe it to be a Chromium bug, and raised a separate report in the Chromium bug tracker, but am logging here as well in case it's an issue with NVDA itself.

Issue does not occur with JAWS or VoiceOver.

Expected behavior:

Users should be able to reliably interact with controls.

NVDA logs, crash dumps and other attachments:

System configuration

NVDA installed/portable/running from source:

NVDA installed on a Windows 11 VM for ARM on macOS. Confirmed issue occurs on Windows for x86 as well.

NVDA version:

2024.4.1

Windows version:

11

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

Chrome or Edge

Other information about your system:

Windows 11 VM in Parallels Desktop; confirmed this also occurs on a real Intel PC

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?

Yes

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Yes

@seanbudd seanbudd added blocked/needs-external-fix p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. app/chrome labels Nov 19, 2024
@Adriani90
Copy link
Collaborator

Following error is written to NVDA log:

IO - inputCore.InputManager.executeGesture (19:52:53.884) - winInputHook (27352):
Input: kb(laptop):tab
IO - speech.speech.speak (19:52:53.903) - MainThread (20248):
Speaking ['Example 2 (dialog inside shadow root)', 'Schalter']
IO - inputCore.InputManager.executeGesture (19:52:54.469) - winInputHook (27352):
Input: kb(laptop):enter
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (19:52:54.489) - MainThread (20248):
accRole failed: (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IA2States (19:52:54.489) - MainThread (20248):
could not get IAccessible2 states
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 2171, in _get_IA2States
_ctypes.COMError: (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IA2Attributes (19:52:54.494) - MainThread (20248):
IAccessibleObject.attributes COMError (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
IO - speech.speech.speak (19:52:54.544) - MainThread (20248):
Speaking ['Sample dialog heading', 'Dialogfeld', 'Sample dialog content\nYour name\nYour favorite food']
IO - speech.speech.speak (19:52:54.544) - MainThread (20248):
Speaking ['Schalter', 'Close dialog']
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (19:52:54.564) - MainThread (20248):
accRole failed: (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IA2States (19:52:54.564) - MainThread (20248):
could not get IAccessible2 states
Traceback (most recent call last):
  File "NVDAObjects\IAccessible\__init__.pyc", line 2171, in _get_IA2States
_ctypes.COMError: (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IA2Attributes (19:52:54.564) - MainThread (20248):
IAccessibleObject.attributes COMError (-2147467259, 'Unbekannter Fehler', (None, None, None, 0, None))
IO - speech.speech.speak (19:52:54.564) - MainThread (20248):
Speaking ['Close dialog', 'Schalter']
IO - inputCore.InputManager.executeGesture (19:52:56.919) - winInputHook (27352):
Input: kb(laptop):enter
ERROR - scriptHandler.executeScript (19:52:56.919) - MainThread (20248):
error executing script: <bound method BrowseModeTreeInterceptor.script_activatePosition of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x06157550>> with gesture 'Eingabe'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 300, in executeScript
  File "browseMode.pyc", line 701, in script_activatePosition
  File "browseMode.pyc", line 716, in _focusLastFocusableObject
  File "virtualBuffers\gecko_ia2.pyc", line 366, in _shouldSetFocusToObj
AttributeError: 'NoneType' object has no attribute 'role'

@Adriani90
Copy link
Collaborator

@seanbudd this issue does not occur with Jaws or Narator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/chrome blocked/needs-external-fix p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

3 participants