nvaccess / nvda

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

Aria labels are not removed in virtual buffers in Chrome and Edge #16156

Open sukiletxe opened 7 months ago

sukiletxe commented 7 months ago

Steps to reproduce:

  1. Install Tampermonkey. If you want to reproduce the issue, install in Chrome or Edge. If you want to see the expected result, install it in Firefox.
  2. Open this link and press install. You can review the script's content beforehand. In summary, this removes aria labels from some links in the Apple TV+ website, both in the language chooser (which allows you to see the actual language, instead of "This page is available in @@language@@" for each language), and in some headings inside links (which reverses the removal of the heading role).
  3. Go to this Apple TV+ show. The notes to the first step apply, this will fail in Chrome or Edge and work fine in Firefox.
  4. Wait like 10 seconds until the full page is loaded.
  5. Press Ctrl + End, then shift+L. First issue.
  6. Press Shift + 2 several times. Second issue.

I believe the issues stem from the same thing (removing aria labels), that's why I put them together.

Actual behavior:

(Seems that speak command keys doesn't work with browse mode commands, so I'll just say which keys I press)

Chrome:

ctrl+end
dialog    no bold
shift+l
list  with 1 item  This page is available in @@language@@  link  
Shift+2
main landmark    black on white  bold  About  heading    level 2
Shift+2
white background  How to Watch  heading    level 2
Shift+2
clickable  Cast & Crew  heading    level 2
Shift+2
clickable  Bonus Content  heading    level 2

Between "bonus content" and "Cast and crew" there is another heading (according to the inspector and the navigator object, however it doesn't show up. I have to press NVDA+F5 or restart NVDA for these issues to disappear. This occurs every time after opening or reloading a page.

Expected behavior:

Firefox:

ctrl+end
out of list  dialog  
Shift+l
list  with 1 item  black on white  Español (México)  link  
Shift+2
main landmark    white background  bold  About  heading    level 2
Shift+2
white background  How to Watch  heading    level 2
Shift+2
clickable  Cast & Crew  heading    level 2
Shift+2
clickable  Related   heading    level 2  link  
Shift+2
clickable  Bonus Content  heading    level 2

NVDA logs, crash dumps and other attachments:

nvda.log

Alternative test

Steps

  1. In this gitHub issue page, open the web console (press ctrl+shift+c and then find an option which says console somewhere in that page).
  2. type document.querySelectorAll("h3 a")[0].ariaLabel="user" to set the aria label to "user".
  3. Remove the aria label by typing document.querySelectorAll("h3 a")[0].removeAttribute("aria-label").
  4. Move to the first level 3 heading.

Expected

very dark aqua-blue grey on aqua-blue white sukiletxe visited link dark aqua-blue grey commented 4 hours ago link • clickable edited button collapsed subMenu heading level 3

Actual

user visited link dark aqua-blue grey on aqua-blue white commented 4 hours ago link • clickable edited button collapsed subMenu heading level 3

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2023.3.3

Windows version:

Windows 10 2022H2, compilation 19045.3930

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

Chrome 121.0.6167.161 (Build oficial) (64 bits) Edge Versión 121.0.2277.106 (Compilación oficial) (64 bits)

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 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

Adriani90 commented 7 months ago

this is related to or might be a duplicate of #12858. @seanbudd I think this is a quite stable test case for reproducing the issue, so in case of duplicate I would rather close #12858 because this one gives us more control in investigating by removing certain aria atributes from websites.

sukiletxe commented 7 months ago

I thought so too, but here the refreshing of the buffer fixes the situation. I tried to reproduce #12858 too, but couldn't (maybe the page changed, maybe I didn't understand the steps). Hence I decided to open a new one.

sukiletxe commented 7 months ago

Also: seems that a toy example (adding the aria label "user" and then removing it with the inspector) yields the same results in Firefox and Chrome. Do you want me to edit the issue description to remove the big complicated use case and add a simpler one?

Adriani90 commented 7 months ago

If you have an alternative simpler test case, it would be nice to have it as alternative in the description. So let’s keep this test case as well.

Also if both Chromium and Firefox are affected, this should be reflected in the description.

Von: Sukil Etxenike @.> Gesendet: Freitag, 9. Februar 2024 14:22 An: nvaccess/nvda @.> Cc: Adriani90 @.>; Comment @.> Betreff: Re: [nvaccess/nvda] Aria labels are not removed in virtual buffers in Chrome and Edge (Issue #16156)

Also: seems that a toy example (adding the aria label "user" and then removing it with the inspector) yields the same results in Firefox and Chrome. Do you want me to edit the issue description to remove the big complicated use case and add a simpler one?

— Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/16156#issuecomment-1935919823 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGVCP4NOTW4VOXGUBFQUYL3YSYPJDAVCNFSM6AAAAABDBHWT2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZVHEYTSOBSGM . You are receiving this because you commented. https://github.com/notifications/beacon/AGVCP4NVEHGBYOTSATJX7XLYSYPJDA5CNFSM6AAAAABDBHWT2OWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTTMPFM6.gif Message ID: @. @.> >

sukiletxe commented 7 months ago

Description updated. I didn't include a log, but if you need one ask for it. And no, as far as I know only Chrome and Edge (and perhaps other Chromium browsers) are affected. I meant that the behaviour was the same (Firefox worked fine, Chrome and Edge didn't).

Adriani90 commented 5 months ago

@seanbudd, @michaelDCurran could you guys please have a look at this? Should we close #12858 as duplicate? Should we create an issue with Chromium on their bug tracker, in case this is not caused by any virtual document internals of NVDA?

Adriani90 commented 5 months ago

This are errors I encountered when the virtual buffer is not updated and NVDA still displays an old version of a web page, at least in MS Edge. UIA is disabled:

IO - inputCore.InputManager.executeGesture (12:42:44.137) - winInputHook (13092):
Input: kb(laptop):NVDA+f5
DEBUG - virtualBuffers.VirtualBuffer._loadBuffer (12:42:44.140) - NVDAObjects.IAccessible.chromium.VirtualBuffer.loadBuffer (13612):
Buffer load took 0.000 sec, 0 chars
DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:44.147) - Dummy-14 (2896):
Thread 21128, build\x86_64\vbufBackends\gecko_ia2\gecko_ia2.cpp, GeckoVBufBackend_t::render, 1442:
Could not get IAccessible2, returning

DEBUGWARNING - virtualBuffers.VirtualBuffer._loadBufferDone (12:42:44.153) - MainThread (18632):
Empty buffer. Waiting for documentLoadComplete event instead
IO - inputCore.InputManager.executeGesture (12:42:47.837) - winInputHook (13092):
Input: kb(laptop):upArrow
IO - speech.speech.speak (12:42:47.849) - MainThread (18632):
Speaking ['Leer']
DEBUGWARNING - virtualBuffers.VirtualBufferTextInfo._getNVDAObjectFromOffset (12:42:47.857) - MainThread (18632):
Couldn't get NVDAObject from offset 0
DEBUGWARNING - virtualBuffers.VirtualBufferTextInfo._getNVDAObjectFromOffset (12:42:47.857) - MainThread (18632):
Couldn't get NVDAObject from offset 0
DEBUGWARNING - virtualBuffers.VirtualBufferTextInfo._getNVDAObjectFromOffset (12:42:47.857) - MainThread (18632):
Couldn't get NVDAObject from offset 0
DEBUGWARNING - browseMode.BrowseModeDocumentTreeInterceptor._set_selection (12:42:47.857) - MainThread (18632):
Invalid NVDAObjectAtStart
DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.857) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::getLineOffsets, 1068:
Offset of 0 too big for buffer, returning false

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.857) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::getLineOffsets, 1068:
Offset of 0 too big for buffer, returning false

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.867) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateTextFieldNodeAtOffset, 867:
Buffer is empty, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.867) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateControlFieldNodeAtOffset, 891:
Could not locate node at offset, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.867) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateTextFieldNodeAtOffset, 867:
Buffer is empty, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.877) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateControlFieldNodeAtOffset, 891:
Could not locate node at offset, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.881) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::findNodeByAttributes, 975:
buffer empty, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.887) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateTextFieldNodeAtOffset, 867:
Buffer is empty, returning NULL

DEBUGWARNING - RPC process 2828 (msedge.exe) (12:42:47.887) - Dummy-14 (2896):
Thread 8808, build\x86_64\vbufBase\storage.cpp, VBufStorage_buffer_t::locateControlFieldNodeAtOffset, 891:
Could not locate node at offset, returning NULL

IO - inputCore.InputManager.executeGesture (12:42:48.264) - winInputHook (13092):
Input: kb(laptop):downArrow
IO - speech.speech.speak (12:42:48.267) - MainThread (18632):
Speaking ['Leer']
seanbudd commented 5 months ago

This needs a technical investigation to determine the source of the problem. A contributor may be interested in doing this, but these issues are often challenging to track down.it may also be worth raising with Chromium for them to confirm it is not an issue with chromium. I've closed the other issue as a duplicate.