nvaccess / nvda

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

table navigation throwing errors in Asus router web interface #8834

Open CSGiuliano77 opened 6 years ago

CSGiuliano77 commented 6 years ago

This has been occurring since I got my first Asus router in 2012, which was the RT-N66U and using NVDA version 2012.2. I have used the stock Asus firmware over the years, as well as the MerlinWRT offshoot. This occurs on all versions. Could it possibly be just poorly written HTML on Merlin's / Asus's end? If you guys need to remote into my laptop at some point, feel free to let me know and we can set up a session. There is also a demo UI from Asus, which will give you an idea of their layout, but doesn't contain multiple clients in a table for testing. The url is: Demoui.asus.com Below is the log info from when I used FF and Chrome.

INFO - main (07:44:04.380): Starting NVDA INFO - core.main (07:44:04.913): Config dir: C:\Users\CSGiu\AppData\Roaming\nvda INFO - config.ConfigManager._loadConfig (07:44:04.913): Loading config: C:\Users\CSGiu\AppData\Roaming\nvda\nvda.ini INFO - core.main (07:44:04.966): NVDA version alpha-16157,526d6fca INFO - core.main (07:44:04.966): Using Windows version 10.0.18252 workstation INFO - core.main (07:44:04.966): Using Python version 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] INFO - core.main (07:44:04.967): Using comtypes version 1.1.3 INFO - core.main (07:44:04.967): Using configobj version 5.1.0 with validate version 1.0.1 INFO - synthDriverHandler.setSynth (07:44:06.288): Loaded synthDriver eloquence INFO - core.main (07:44:06.302): Using wx version 4.0.3 msw (phoenix) wxWidgets 3.0.5 INFO - brailleInput.initialize (07:44:06.305): Braille input initialized INFO - braille.initialize (07:44:06.309): Using liblouis version 3.7.0 INFO - braille.BrailleHandler.setDisplayByName (07:44:06.311): Loaded braille display driver noBraille, current display has 0 cells. WARNING - core.main (07:44:06.357): Java Access Bridge not available INFO - _UIAHandler.UIAHandler.MTAThreadFunc (07:44:06.371): UIAutomation: IUIAutomation6 WARNING - globalPlugins.MathMlReader (07:44:07.006): MathPlayer 4 not available INFO - core.main (07:44:07.025): NVDA initialized

//Here are the errors when using FF

ERROR - scriptHandler.executeScript (08:51:18.631): error executing script: <bound method Gecko_ia2.script_previousColumn of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x05D02B50>> with gesture u'alt+ctrl+left arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 189, in script_previousColumn File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' ERROR - scriptHandler.executeScript (08:51:24.641): error executing script: <bound method Gecko_ia2.script_nextRow of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x05D02B50>> with gesture u'alt+ctrl+down arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 174, in script_nextRow File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' ERROR - scriptHandler.executeScript (08:51:27.694): error executing script: <bound method Gecko_ia2.script_nextRow of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x05D02B50>> with gesture u'alt+ctrl+down arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 174, in script_nextRow File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject'

//and here are the errors when using Chrome

ERROR - scriptHandler.executeScript (08:59:40.654): error executing script: <bound method ChromeVBuf.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x05A9CBF0>> with gesture u'alt+ctrl+up arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 179, in script_previousRow File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' ERROR - scriptHandler.executeScript (08:59:43.540): error executing script: <bound method ChromeVBuf.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x05A9CBF0>> with gesture u'alt+ctrl+up arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 179, in script_previousRow File "documentBase.pyc", line 171, in _tableMovementScriptHelper File "browseMode.pyc", line 1217, in _set_selection File "baseObject.pyc", line 21, in get File "textInfos\offsets.pyc", line 311, in _get_NVDAObjectAtStart File "virtualBuffers__init__.pyc", line 186, in _getNVDAObjectFromOffset File "virtualBuffers\gecko_ia2.pyc", line 169, in getNVDAObjectFromIdentifier File "IAccessibleHandler.pyc", line 324, in normalizeIAccessible RuntimeError: <comtypes.client.dynamic._Dispatch object at 0x05D759F0> Not an IAccessible ERROR - scriptHandler.executeScript (08:59:46.756): error executing script: <bound method ChromeVBuf.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x05A9CBF0>> with gesture u'alt+ctrl+up arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 179, in script_previousRow File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' ERROR - scriptHandler.executeScript (09:17:49.201): error executing script: <bound method ChromeVBuf.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x05A9CBF0>> with gesture u'alt+ctrl+up arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 179, in script_previousRow File "documentBase.pyc", line 161, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 337, in _getNearestTableCell File "documentBase.pyc", line 138, in _getNearestTableCell File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' ERROR - scriptHandler.executeScript (09:18:07.513): error executing script: <bound method ChromeVBuf.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x05A9CBF0>> with gesture u'alt+ctrl+up arrow' Traceback (most recent call last): File "scriptHandler.pyc", line 187, in executeScript File "documentBase.pyc", line 179, in script_previousRow File "documentBase.pyc", line 167, in _tableMovementScriptHelper File "virtualBuffers\gecko_ia2.pyc", line 327, in _getTableCellAt AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject'

Steps to reproduce:

  1. Open FF or Chrome and type router's IP into address bar. Example 192.168.1.1
  2. At the sign in screen, enter router credentials. Example, Username:Admin - Password:BlaBlaBla and press the sign-in button. You will be taken to the router's web interface screen.
  3. locate the "view list" button using any means of navigation then press that button. The client list appears as a table further down the page.
  4. Try using table navigation commands to read up and down the columns. Any column will do. I navigated the "Client's name" and "client's IP address" columns.

Actual behavior:

NVDA bonks and errors are written to the log, and also throws me into a different column. it is inconsistent (does not occur every time I navigate up and down a column).

Expected behavior:

NVDA should read the previous/next row.

System configuration:

NVDA Installed/portable/running from source:

Installed

NVDA version:

alpha-16157,526d6fca

Windows version:

Windows 10 19H2 build 10252.1000

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

Firefox version 63.0B13 and earlier back to versions from 2012 Google Chrome V69.0.3497.100 and earlier versions back to 2012

Other information about your system:

Macbook Air mid 2012 using Bootcamp Also occurs on other systems, Del, Lenovo, etc.

Other questions:

Does the issue still occur after restarting your PC?

Yes

Have you tried any other versions of NVDA?

Yes.

Brian1Gaff commented 6 years ago

I would suspect the code in the page as it seems to think its a table in one place but cannot identify it as one elsewhere, what on earth is it I wonder?

bglists@blueyonder.co.uk Sent via blueyonder. Please address personal E-mail to:- briang1@blueyonder.co.uk, putting 'Brian Gaff' in the display name field. ----- Original Message

CSGiuliano77 commented 6 years ago

Anything I can do on my end to assist aside from coding skills, which I lack? The site for Merlin’s off shoot is:

AsusWRT-Merlin

https://asuswrt.lostrealm.ca

From: Brian Gaff notifications@github.com Sent: Wednesday, October 10, 2018 11:47 AM To: nvaccess/nvda nvda@noreply.github.com Cc: CSGiuliano77 CSGiuliano77@gmail.com; Author author@noreply.github.com Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

I would suspect the code in the page as it seems to think its a table in one place but cannot identify it as one elsewhere, what on earth is it I wonder?

bglists@blueyonder.co.uk mailto:bglists@blueyonder.co.uk Sent via blueyonder. Please address personal E-mail to:- briang1@blueyonder.co.uk mailto:briang1@blueyonder.co.uk , putting 'Brian Gaff' in the display name field. ----- Original Message

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8834#issuecomment-428624979 , or mute the thread https://github.com/notifications/unsubscribe-auth/APUSzniyG-jXX__wTMdo4oCtZbnf7PNCks5ujhZ-gaJpZM4XVl-K . https://github.com/notifications/beacon/APUSzjtYlbRfsYlps8RrjcjRe8RYyZgaks5ujhZ-gaJpZM4XVl-K.gif

LeonarddeR commented 6 years ago

I've been trying to debug exactly the same bug in another web app which is unfortunately closed to the public.

Note that the AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject' error is different from the error in 2018.3.2 due to #8678. There, the actual error raised is AttributeError: 'IAccessible' object has no attribute 'IAccessibleTableObject'`

The underlying cause is the same, getNVDAObjectFromIdentifier returns either a non-IAccessible2 object (NVDA 2018.3.2) or a None object (current master).

The web application I was able to reproduce this in, had a very odd table which parent div showed up when a particular edit box got focus, and was set to display: none; when the edit box lost focus. When I used a tampermonkey script to force remove the display: none; entry from the style attribute, table navigation seemed to work fine again.

Also a small detail, JAWS doesn't seem to suffer from this problem, at least not in my test case.

Brian1Gaff commented 6 years ago

Sounds like another page designed with the sighted user in mind then, as you really cannot be in two places at the same time when you are blind, at least not easily. Jaws may well not be looking at tables in the same way nvda does and escapes the problem then.

bglists@blueyonder.co.uk Sent via blueyonder. Please address personal E-mail to:- briang1@blueyonder.co.uk, putting 'Brian Gaff' in the display name field.

CSGiuliano77 commented 6 years ago

Thanks guys for taking a look. Should I get in contact with Asus, or at the very least the dev responsible for the alt firmware? Other than pointing them to this ticket, I’m not sure how to go about explaining the issue.

Carlo

From: Brian Gaff notifications@github.com Sent: Thursday, October 11, 2018 4:25 AM To: nvaccess/nvda nvda@noreply.github.com Cc: CSGiuliano77 CSGiuliano77@gmail.com; Author author@noreply.github.com Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

Sounds like another page designed with the sighted user in mind then, as you really cannot be in two places at the same time when you are blind, at least not easily. Jaws may well not be looking at tables in the same way nvda does and escapes the problem then.

bglists@blueyonder.co.uk mailto:bglists@blueyonder.co.uk Sent via blueyonder. Please address personal E-mail to:- briang1@blueyonder.co.uk mailto:briang1@blueyonder.co.uk , putting 'Brian Gaff' in the display name field.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8834#issuecomment-428865942 , or mute the thread https://github.com/notifications/unsubscribe-auth/APUSzka39_0CXVYFLr8dIR95xBWLDt2jks5ujwBcgaJpZM4XVl-K . https://github.com/notifications/beacon/APUSzo4TsLfad2Fao3U9srjA85m9aKk6ks5ujwBcgaJpZM4XVl-K.gif

Adriani90 commented 5 years ago

cc: @jcsteh

Adriani90 commented 4 years ago

@CSGiuliano77 are you still having this issue with NVDA 2019.3 Beta 1?

CSGiuliano77 commented 4 years ago

Yes, I do see this happening with latest alpha snapshot. The log is pasted below. Thanks, and happy holidays.

INFO - main (12:04:22.500) - MainThread (6924):

Starting NVDA version alpha-19460,d7229eff

INFO - core.main (12:04:22.655) - MainThread (6924):

Config dir: C:\Users\csgiu\AppData\Roaming\nvda

INFO - config.ConfigManager._loadConfig (12:04:22.655) - MainThread (6924):

Loading config: C:\Users\csgiu\AppData\Roaming\nvda\nvda.ini

INFO - core.main (12:04:22.685) - MainThread (6924):

Using Windows version 10.0.18363 workstation

INFO - core.main (12:04:22.685) - MainThread (6924):

Using Python version 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 14 2019, 23:09:19) [MSC v.1916 32 bit (Intel)]

INFO - core.main (12:04:22.685) - MainThread (6924):

Using comtypes version 1.1.7

INFO - core.main (12:04:22.685) - MainThread (6924):

Using configobj version 5.1.0 with validate version 1.0.1

INFO - synthDriverHandler.setSynth (12:04:23.416) - MainThread (6924):

Loaded synthDriver ibmeci

INFO - core.main (12:04:23.426) - MainThread (6924):

Using wx version 4.0.3 msw (phoenix) wxWidgets 3.0.5 with six version 1.12.0

INFO - brailleInput.initialize (12:04:23.426) - MainThread (6924):

Braille input initialized

INFO - braille.initialize (12:04:23.430) - MainThread (6924):

Using liblouis version 3.10.0

INFO - braille.initialize (12:04:23.431) - MainThread (6924):

Using pySerial version 3.4

INFO - braille.BrailleHandler.setDisplayByName (12:04:23.436) - MainThread (6924):

Loaded braille display driver noBraille, current display has 0 cells.

INFO - core.main (12:04:23.643) - MainThread (6924):

Java Access Bridge support initialized

INFO - _UIAHandler.UIAHandler.MTAThreadFunc (12:04:23.658) - _UIAHandler.UIAHandler.MTAThread (7360):

UIAutomation: IUIAutomation6

INFO - external:globalPlugins.translate.GlobalPlugin.init (12:04:23.931) - MainThread (6924):

Translate module initialized, translating to en

INFO - core.main (12:04:24.092) - MainThread (6924):

NVDA initialized

INFO - config.ConfigManager._loadConfig (12:04:34.528) - MainThread (6924):

Loading config: C:\Users\csgiu\AppData\Roaming\nvda\profiles\firefox.ini

ERROR - scriptHandler.executeScript (17:17:44.552) - MainThread (6924):

error executing script: <bound method DocumentWithTableNavigation.script_nextColumn of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x0140AF90>> with gesture 'alt+ctrl+right arrow'

Traceback (most recent call last):

File "virtualBuffers\gecko_ia2.pyc", line 347, in _getTableCellAt

AttributeError: 'NoneType' object has no attribute 'IAccessibleTable2Object'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "scriptHandler.pyc", line 205, in executeScript

File "documentBase.pyc", line 180, in script_nextColumn

File "documentBase.pyc", line 157, in _tableMovementScriptHelper

File "virtualBuffers\gecko_ia2.pyc", line 359, in _getNearestTableCell

File "documentBase.pyc", line 134, in _getNearestTableCell

File "virtualBuffers\gecko_ia2.pyc", line 349, in _getTableCellAt

AttributeError: 'NoneType' object has no attribute 'IAccessibleTableObject'

From: Adriani90 notifications@github.com Sent: Friday, December 20, 2019 6:03 PM To: nvaccess/nvda nvda@noreply.github.com Cc: CSGiuliano77 CSGiuliano77@gmail.com; Mention mention@noreply.github.com Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

@CSGiuliano77 https://github.com/CSGiuliano77 are you still having this issue with NVDA 2019.3 Beta 1?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8834?email_source=notifications&email_token=AD2RFTUX53E4LY3HKXQ5MQDQZVFIPA5CNFSM4F2WL6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHOM5RY#issuecomment-568118983 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2RFTUPHZUDU7CXA2KDXH3QZVFIPANCNFSM4F2WL6FA .

Adriani90 commented 4 years ago

This seems to me like an we authoring issue. The table attribute is not added to the object according to the log snippet. But I might be wrong here.

Adriani90 commented 4 years ago

@CSGiuliano77 are you still having this issue with NVDA 2020.1 and Chrome 83 or Firefox 76?

CSGiuliano77 commented 4 years ago

Yes, this still occurs both in Firefox 77.0 and the latest Chromium Edge dev build 84.0.522.9 using NVDA alpha build 20248,c452333e. The latest log is pasted below. The errors are similar to the last log from 2019.

INFO - main (05:45:33.328) - MainThread (14532):

Starting NVDA version alpha-20248,c452333e

INFO - core.main (05:45:33.781) - MainThread (14532):

Config dir: C:\Users\CSGiuliano\AppData\Roaming\nvda

INFO - config.ConfigManager._loadConfig (05:45:33.781) - MainThread (14532):

Loading config: C:\Users\CSGiuliano\AppData\Roaming\nvda\nvda.ini

INFO - core.main (05:45:33.829) - MainThread (14532):

Using Windows version 10.0.19041 workstation

INFO - core.main (05:45:33.829) - MainThread (14532):

Using Python version 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 09:44:33) [MSC v.1900 32 bit (Intel)]

INFO - core.main (05:45:33.829) - MainThread (14532):

Using comtypes version 1.1.7

INFO - core.main (05:45:33.830) - MainThread (14532):

Using configobj version 5.1.0 with validate version 1.0.1

INFO - synthDriverHandler.setSynth (05:45:34.970) - MainThread (14532):

Loaded synthDriver ibmeci

INFO - core.main (05:45:34.970) - MainThread (14532):

Using wx version 4.0.3 msw (phoenix) wxWidgets 3.0.5 with six version 1.12.0

INFO - brailleInput.initialize (05:45:34.973) - MainThread (14532):

Braille input initialized

INFO - braille.initialize (05:45:34.974) - MainThread (14532):

Using liblouis version 3.13.0

INFO - braille.initialize (05:45:34.977) - MainThread (14532):

Using pySerial version 3.4

INFO - braille.BrailleHandler.setDisplayByName (05:45:34.982) - MainThread (14532):

Loaded braille display driver noBraille, current display has 0 cells.

INFO - core.main (05:45:35.210) - MainThread (14532):

Java Access Bridge support initialized

INFO - _UIAHandler.UIAHandler.MTAThreadFunc (05:45:35.224) - _UIAHandler.UIAHandler.MTAThread (14120):

UIAutomation: IUIAutomation6

INFO - external:globalPlugins.translate.GlobalPlugin.init (05:45:35.424) - MainThread (14532):

Translate module initialized, translating to en

INFO - core.main (05:45:35.651) - MainThread (14532):

NVDA initialized

INFO - config.ConfigManager._loadConfig (05:46:10.562) - MainThread (14532):

Loading config: C:\Users\CSGiuliano\AppData\Roaming\nvda\profiles\firefox.ini

ERROR - scriptHandler.executeScript (05:51:00.077) - MainThread (14532):

error executing script: <bound method DocumentWithTableNavigation.script_nextRow of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x00AA4250>> with gesture 'alt+ctrl+down arrow'

Traceback (most recent call last):

File "virtualBuffers\gecko_ia2.pyc", line 429, in _getTableCellAt

AttributeError: 'IAccessible' object has no attribute 'IAccessibleTable2Object'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "scriptHandler.pyc", line 205, in executeScript

File "documentBase.pyc", line 170, in script_nextRow

File "documentBase.pyc", line 157, in _tableMovementScriptHelper

File "virtualBuffers\gecko_ia2.pyc", line 441, in _getNearestTableCell

File "documentBase.pyc", line 134, in _getNearestTableCell

File "virtualBuffers\gecko_ia2.pyc", line 431, in _getTableCellAt

AttributeError: 'IAccessible' object has no attribute 'IAccessibleTableObject'

ERROR - scriptHandler.executeScript (05:55:18.314) - MainThread (14532):

error executing script: <bound method DocumentWithTableNavigation.script_previousColumn of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x00AAB570>> with gesture 'alt+ctrl+left arrow'

Traceback (most recent call last):

File "virtualBuffers\gecko_ia2.pyc", line 429, in _getTableCellAt

AttributeError: 'IAccessible' object has no attribute 'IAccessibleTable2Object'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "scriptHandler.pyc", line 205, in executeScript

File "documentBase.pyc", line 185, in script_previousColumn

File "documentBase.pyc", line 157, in _tableMovementScriptHelper

File "virtualBuffers\gecko_ia2.pyc", line 441, in _getNearestTableCell

File "documentBase.pyc", line 134, in _getNearestTableCell

File "virtualBuffers\gecko_ia2.pyc", line 431, in _getTableCellAt

AttributeError: 'IAccessible' object has no attribute 'IAccessibleTableObject'

From: Adriani90 notifications@github.com Sent: Friday, May 22, 2020 7:23 AM To: nvaccess/nvda nvda@noreply.github.com Cc: CSGiuliano77 CSGiuliano77@gmail.com; Mention mention@noreply.github.com Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

@CSGiuliano77 https://github.com/CSGiuliano77 are you still having this issue with NVDA 2020.1 and Chrome 83 or Firefox 76?

— You are receiving this because you were mentioned. Reply to this email directly,

view it on GitHub https://github.com/nvaccess/nvda/issues/8834#issuecomment-632641398 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2RFTUTEM6NGUDWJMOL33DRSZOAXANCNFSM4F2WL6FA . https://github.com/notifications/beacon/AD2RFTS2IANHJH3ZUQ2QJPTRSZOAXA5CNFSM4F2WL6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEW2VO5Q.gif

Adriani90 commented 1 year ago

My assumption is that probably the author uses some kind of combination between css display:table and HTML

. But without a minimal test case this will be hard to investigate.

CSGiuliano77 commented 1 year ago

Are there any tools I can use to get you what you need? Unfortunately, attaching the page in question doesn’t look to be an option. I can be available for someone to connect to my machine if interested. Thanks.

Carlo

From: Adriani90 @.> Sent: Friday, April 14, 2023 7:26 To: nvaccess/nvda @.> Cc: CSGiuliano77 @.>; Mention @.> Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

My assumption is that probably the author uses some kind of combination between css display:table and HTML

. But without a minimal test case this will be hard to investigate.

— Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8834#issuecomment-1508361903 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2RFTXFAIC2VIQKV6LH52TXBEX23ANCNFSM4F2WL6FA . You are receiving this because you were mentioned.Message ID: @.***>

mwhapples commented 1 year ago

I have asus routers and can verify the issue. I do notice something interesting with that particular table, if I leave my cursor in a table cell then I notice periodically my Braille display and cursor seem to be changing position. I suspect this may relate to the UI updating the table to reflect changes in the information such as connection speed. I do have an old RT-N66U not currently in use which I could use as a test system and experiment with to explore this further.

mwhapples commented 1 year ago

I have taken a look at the source code for the router client list. It is periodically updating the list as I suspected. It looks like to update the list/table it is deleting elements and then recreating a new element rather than just changing the text in the elements. The deleted and new elements have the same IDs. Could this account for the issue? I could look at creating a minimal example for what I suspect is going on.

mwhapples commented 1 year ago

My assumption is that probably the author uses some kind of combination between css display:table and HTML

. But without a minimal test case this will be hard to investigate.

I have created a minimal example based upon what I found going on in the asus router firmware and NVDA behaves the same in the minimal example. My minimal example can be found at https://github.com/mwhapples/refreshing-table-example it is a Kotlin JS project and needs building with gradle. For those who do not want to build, I attach a ZIP containing the HTML and JavaScript the Kotlin compiler generates, just unzip all the files and open the HTML file in a browser. example.zip

mwhapples commented 1 year ago

The minimal example has a function which is run periodically (approx 5 seconds). NOTE: It takes 5 seconds for the function to be run the first time so the table will not appear immediately, please wait. This function will check for an element with ID "client-table" and if it does it removes the element. It then creates a new table element with ID "client-table" and populates it with data. The numbers in the speed column are randomly generated and should change upon every refresh of the table, this is to simulate connection speeds varying in the asus router firmware. This probably causes NVDA trouble as the specific HTML element instance it thought was at the virtual buffer cursor no longer exists in the document. However in this minimal example an equivalent element in the new table element will exist, could NVDA do something to try and find that new equivalent element instead of erroring? In the asus router firmware case there is another possibility where a client may have joined or left the network, in which case the number of cells in the table may have changed and thus the element NVDA thought was at the virtual buffer cursor may no longer exist. What NVDA should do in this case i don't know.

mwhapples commented 1 year ago

@CSGiuliano77 Does the minimal example I had previously attached to this issue show the bug for you? IE. is the minimal example replicating the correct thing to investigate.

mwhapples commented 1 year ago

@Adriani90 now we have a minimal example, I really need some help from those more experienced with how NVDA internals work. Can we have that discussion please.

Adriani90 commented 1 year ago

cc: @michaelDCurran

CSGiuliano77 commented 1 year ago

Yes, this does reproduce what I am seeing in the router’s web interface.

From: mwhapples @.> Sent: Tuesday, May 2, 2023 10:44 To: nvaccess/nvda @.> Cc: CSGiuliano77 @.>; Mention @.> Subject: Re: [nvaccess/nvda] table navigation throwing errors in Asus router web interface (#8834)

@CSGiuliano77 https://github.com/CSGiuliano77 Does the minimal example I had previously attached to this issue show the bug for you? IE. is the minimal example replicating the correct thing to investigate.

— Reply to this email directly, view it on GitHub https://github.com/nvaccess/nvda/issues/8834#issuecomment-1531607139 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AD2RFTXSC6OM5QFIJSLYYK3XEEMRPANCNFSM4F2WL6FA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/AD2RFTSXE2M3NSTF6EUYXY3XEEMRPA5CNFSM4F2WL6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOLNFHQYY.gif Message ID: @. @.> >

Adriani90 commented 1 year ago

@mwhapples thank you very much for digging into this, your example is very valuable. I can reproduce with this test case, Following error is written to m log:

IO - inputCore.InputManager.executeGesture (17:12:20.381) - winInputHook (16544):
Input: kb(laptop):alt+control+upArrow
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (17:12:20.418) - MainThread (5544):
accRole failed: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))
ERROR - scriptHandler.executeScript (17:12:20.418) - MainThread (5544):
error executing script: <bound method DocumentWithTableNavigation.script_previousRow of <NVDAObjects.IAccessible.chromium.ChromeVBuf object at 0x0589BC50>> with gesture 'Alt+Strg+Pfeiltaste nach oben'
Traceback (most recent call last):
  File "virtualBuffers\gecko_ia2.pyc", line 539, in _getTableCellAt
AttributeError: 'IAccessible' object has no attribute 'IAccessibleTable2Object'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "scriptHandler.pyc", line 257, in executeScript
  File "documentBase.pyc", line 391, in script_previousRow
  File "documentBase.pyc", line 348, in _tableMovementScriptHelper
  File "virtualBuffers\gecko_ia2.pyc", line 569, in _getNearestTableCell
  File "documentBase.pyc", line 233, in _getNearestTableCell
  File "virtualBuffers\gecko_ia2.pyc", line 541, in _getTableCellAt
AttributeError: 'IAccessible' object has no attribute 'IAccessibleTableObject'
Adriani90 commented 1 year ago

Mick can certainly give more input on the internals of NVDA regarding this behavior, but I suspect following:

  • While the table is updating, either cells or cell content is removed and added instantly.
  • When you move between the cells with NVDA's virtual cursor while this updating process is occuring, there is a short period of time in which the elements are not yet added to the table, but are probably displayed without any cell or table role
  • in this short period of time, NVDA tries to fetch them from IAccessible API but it assumes they should be part of a table.
  • NVDA fails to fetch them because the IAccessible table role is added later.
  • Finally NVDA just reports entering table and the number of rows and columns instead of the updated comment and throws an error while trying to fetch the updated table cell content.

Expected: NVDA should try to fetch the elements as soon as it is sure that they have the IAccessible table role, and not before that.

but depending on how quick the table is updating, NVDA might not be able to report the element as fast anyway. In that case, NVDA should rather try to report the newest update to the cell and should not throw any error.

Also maybe the web author could set the IAccessible table role on the updating elements as soon as possible so that NVDA can fetch them at soonest.

mwhapples commented 1 year ago

My testing of this suggests it is not unfortunate timing whilst the table is being recreated, rather it relates simply to the fact the table element is removed from the document and a new replacement element is inserted. The reason I think this is because with my minimal example, when I see the text change on my Braille display, if I wait 1 second before navigating I still get the issue (as the refresh rate in the minimal example is 5 seconds then waiting 1 second after a change should be clear of any moments when the table is being changed). It feels like a invalid reference may be held for the table cell in the old table element. It may be interesting to get the text of the IAccessible object causing the error to test whether it is something from the old table.

mwhapples commented 1 year ago

I have done some testing with Jaws and looks like Jaws really has a similar bug although it is being less verbose and so making it more difficult to spot the bug. Getting back to NVDA, looks like there are multiple issues making this up:

  1. The error in the log. I think this may be caused by the table being removed and a new one being inserted and NVDA having a out of date reference.
  2. The speaking "out of table, in table", strictly speaking NVDA is saying the correct thing as the actual table instance has been removed, thus NVDA has left that table, a new table element is created and NVDA finds itself having entered a new table.
  3. The table refreshing may lead to poor table navigation as the cursor may move upon table refresh (previous table cell text may have changed length, it may be the cursor was in the same cell it was before the refresh or it may actually have moved to another table cell). This may lead to unpredictable navigation as the user does not end up where they thought they would go because they are unaware of the table refresh. I get the feeling 1 may be a bit of a red herring, we probably need to catch the case and handle it. As for 2 it is strictly correct but I could see a case for less verbosity should NVDA be able to tell the replacement was really meant to be a refresh. Finally 3 to fix would need a better repositioning of the cursor when elements are removed and new ones inserted, the navigation commands are strictly speaking working correctly if you pay attention to the cursor position when the table is replaced (Braille shows this but speech doesn't announce it).
Adriani90 commented 5 months ago

I used the new vertical navigation feature in NVDA to see whether this happens as well, and there seems NVDA cannot get the location of the newly added content after updating. The question is does the web author expose the location of the newly added cell properly? Or is the accessibility API responsible for that?

IO - inputCore.InputManager.executeGesture (11:38:39.746) - winInputHook (19620):
Input: kb(laptop):NVDA+alt+upArrow
ERROR - scriptHandler.executeScript (11:38:39.749) - MainThread (26532):
error executing script: <bound method BrowseModeTreeInterceptor.addQuickNav.<locals>.<lambda> of <virtualBuffers.gecko_ia2.Gecko_ia2 object at 0x0A139070>> with gesture 'NVDA+Alt+Pfeiltaste nach oben'
Traceback (most recent call last):
  File "scriptHandler.pyc", line 295, in executeScript
  File "browseMode.pyc", line 567, in <lambda>
  File "browseMode.pyc", line 516, in _quickNavScript
  File "browseMode.pyc", line 2550, in _iterSimilarParagraph
  File "browseMode.pyc", line 494, in paragraphFunc
  File "baseObject.pyc", line 41, in __get__
  File "virtualBuffers\gecko_ia2.pyc", line 260, in _get_location
_ctypes.COMError: (-2147024809, 'Falscher Parameter.', (None, None, None, 0, None))