nvda icon indicating copy to clipboard operation
nvda copied to clipboard

NVDA reports wrong position information and label for radio buttons in Chromium-based browsers when using focus mode and the elements list dialog

Open jmdaweb opened this issue 1 year ago • 2 comments

Steps to reproduce:

Given the following HTML code fragment:

<form>
<p><label for="button1">First radio button</label>
<input type="radio" name="buttons" id="button1" checked/></p>
<p><label for="button2">Second radio button</label>
<input type="radio" name="buttons" id="button2"/></p>
<p><label for="button3">Third radio button</label>
<input type="radio" name="buttons" id="button3"/></p>
<p><label for="button4">Fourth radio button</label>
<input type="radio" name="buttons" id="button4"/></p>
</form>

Follow these steps:

  1. Create a full HTML document including this code.
  2. Open the file in Google Chrome.
  3. Explore the radio buttons in focus mode.
  4. List the radio buttons by opening the element list dialog and choosing Form fields category.

Actual behavior:

NVDA does not retrieve the relative position for each button in the group, so it reads "1 of 1". In the elements list dialog, the radio buttons are displayed as "unlabeled" first, showing their labels in fourth place.

Expected behavior:

NVDA should report the relative object position in focus mode (1 of 4, 2 of 4, etc.), and show the label firstly in the elements list dialog.

NVDA logs, crash dumps and other attachments:

Output in Chromium-based browsers when pressing NVDA+f1:

Developer info for navigator object:
name: 'First radio button'
role: Role.RADIOBUTTON
roleText: None
states: State.CHECKED, State.FOCUSABLE, State.FOCUSED, State.CHECKABLE
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.ia2Web.Ia2Web object at 0x2123FA90>
Python class mro: (<class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=158, top=111, width=17, height=17)
value: ''
TextInfo: <class 'NVDAObjects.IAccessible.IA2TextTextInfo'>
appModule: <'appModuleHandler' (appName 'chrome', process ID 6816) at address 2123fc70>
appModule.productName: 'Google Chrome'
appModule.productVersion: '103.0.5060.134'
appModule.helperLocalBindingHandle: c_long(532066048)
windowHandle: 331108
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 10962048
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 24468
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x1a6ce62c at 2d5a8da0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=331108, objectID=-4, childID=-344
IAccessible accName: 'First radio button'
IAccessible accRole: ROLE_SYSTEM_RADIOBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_CHECKED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048596)
IAccessible accDescription: None
IAccessible accValue: ''
IAccessible2 windowHandle: 331108
IAccessible2 uniqueID: -344
IAccessible2 role: ROLE_SYSTEM_RADIOBUTTON
IAccessible2 states: IA2_STATE_OPAQUE, IA2_STATE_CHECKABLE (263168)
IAccessible2 attributes: 'display:inline-block;tag:input;setsize:1;posinset:1;checkable:true;explicit-name:true;id:button1;text-align:left;'
IAccessible2 relations: 

Output in Firefox, where things work as expected:

Developer info for navigator object:
name: 'First radio button'
role: Role.RADIOBUTTON
roleText: None
states: State.CHECKED, State.FOCUSABLE, State.FOCUSED, State.CHECKABLE
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x1970BE70>
Python class mro: (<class 'NVDAObjects.IAccessible.mozilla.Mozilla'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: ''
location: RectLTWH(left=158, top=164, width=17, height=17)
value: None
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: <'firefox' (appName 'firefox', process ID 6004) at address 21251510>
appModule.productName: 'Firefox'
appModule.productVersion: '103.0'
appModule.helperLocalBindingHandle: c_long(144697480)
windowHandle: 855472
windowClassName: 'MozillaWindowClass'
windowControlID: 0
windowStyle: 399441920
extendedWindowStyle: 256
windowThreadID: 30416
windowText: 'Radio buttons - Mozilla Firefox'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x8a759cc at 1266b210>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=855472, objectID=-4, childID=-8388615
IAccessible accName: 'First radio button'
IAccessible accRole: ROLE_SYSTEM_RADIOBUTTON
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_CHECKED, STATE_SYSTEM_MARQUEED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1056788)
IAccessible accDescription: ''
IAccessible accValue: None
IAccessible2 windowHandle: 855472
IAccessible2 uniqueID: -8388615
IAccessible2 role: ROLE_SYSTEM_RADIOBUTTON
IAccessible2 states: IA2_STATE_OPAQUE, IA2_STATE_CHECKABLE (263168)
IAccessible2 attributes: 'margin-bottom:0px;margin-top:3px;text-align:start;margin-right:3px;margin-left:5px;checkable:true;explicit-name:true;display:inline-block;id:button1;setsize:4;tag:input;text-indent:0px;posinset:1;'
IAccessible2 relations: labelledBy, memberOf, containingDocument, containingTabPane, containingApplication

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2022.2

Windows version:

Windows 11 21H2 (x64) build 22000.832

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

Google Chrome 103.0.5060.134 and Microsoft Edge 103.0.1264.71

Other information about your system:

Removing the containers (in this case, paragraphs), NVDA reports the object positions in Chrome. Everything works as expected on Firefox. Tested with versions 102.x-103.0.

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.

Same problems in 2022.1.

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

jmdaweb avatar Jul 27 '22 19:07 jmdaweb

Originally reported by @serlumo

jmdaweb avatar Jul 27 '22 19:07 jmdaweb

This is a long standing issue. Chrome is reporting an incorrect setsize attribute as it can be seen in this line: IAccessible2 attributes: 'display:inline-block;tag:input;setsize:1;posinset:1;checkable:true;explicit-name:true;id:button1;text-align:left;'. I wonder if this is being tracked from the Chromium side.

rperez030 avatar Jul 28 '22 03:07 rperez030

cc: @aleventhal, @ObjectInSpace

Adriani90 avatar Apr 11 '23 15:04 Adriani90

Filled Chromium bug https://bugs.chromium.org/p/chromium/issues/detail?id=1433153

Adriani90 avatar Apr 14 '23 01:04 Adriani90