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

Support the IA2_ROLE_LANDMARK #10101

Closed
MarcoZehe opened this issue Aug 15, 2019 · 8 comments · Fixed by #10110
Closed

Support the IA2_ROLE_LANDMARK #10101

MarcoZehe opened this issue Aug 15, 2019 · 8 comments · Fixed by #10110
Milestone

Comments

@MarcoZehe
Copy link
Contributor

Steps to reproduce:

  1. In Firefox, open this: data:text/html,<header>I am a banner</header><section><header>I am not a banner</header></section>
  2. Examine the hierarchy for the "I am a banner" text.

Actual behavior:

For the parent, which corresponds to the header element that is a direct descendant of the document and therefore treated as a landmark, the role is spoken as "unknown". The developer info (NVDA+F1) is:

Developer info for navigator object:
name: None
role: ROLE_UNKNOWN
states:
isFocusable: False
hasFocus: False
Python object: <NVDAObjects.IAccessible.mozilla.Mozilla object at 0x056244F0>
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'>, <type 'object'>)
description: u''
location: RectLTWH(left=20, top=205, width=3800, height=47)
value: None
appModule: <'firefox' (appName u'firefox', process ID 15784) at address 4e9be50>
appModule.productName: u'Firefox Nightly'
appModule.productVersion: u'70.0a1'
TextInfo: <class 'NVDAObjects.IAccessible.IA2TextTextInfo'>
windowHandle: 590956L
windowClassName: u'MozillaWindowClass'
windowControlID: 0
windowStyle: 399441920
extendedWindowStyle: 256
windowThreadID: 1460
windowText: u'Firefox Nightly'
displayText: u''
IAccessibleObject: <POINTER(IAccessible2) ptr=0xa0120a4 at e72be40>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=590956L, objectID=-4, childID=-67110976
IAccessible accName: None
IAccessible accRole: u'header'
IAccessible accState: (0)
IAccessible accDescription: u''
IAccessible accValue: None
IAccessible2 windowHandle: 590956
IAccessible2 uniqueID: -67110976
IAccessible2 role: IA2_ROLE_LANDMARK
IAccessible2 states: IA2_STATE_SELECTABLE_TEXT, IA2_STATE_OPAQUE (5120)
IAccessible2 attributes: u'margin-left:0px;text-align:start;text-indent:0px;margin-right:0px;tag:header;margin-top:0px;margin-bottom:0px;xml-roles:banner;display:block;formatting:block;'

Expected behavior:

NVDA should not treat IA2_ROLE_LANDMARK as an unknown role, but read it as "landmark" or something sensibly similar.

System configuration

NVDA installed/portable/running from source:

Installed.

NVDA version:

All versions, including 2019.3alphas.

Windows version:

All Windows 10 versions.

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

Firefox current release, beta, or nightly. IA2_ROLE_LANDMARK has been exposed since Firefox 65, see Bug 614572.

Other information about your system:

Also happens in Chrome, which also exposes this role.

Other questions

Does the issue still occur after restarting your PC?

Yes.

Have you tried any other versions of NVDA? If so, please report their behaviors.

Several, all yield the same result.

@LeonarddeR
Copy link
Collaborator

What did firefox and chrome expose before this role was added?

I initially thought that this would be trivial, but there is not yet a controlTypes.ROLE_LANDMARK

@MarcoZehe
Copy link
Contributor Author

Initially, they simply exposed whatever the host language's element accessible was, so section for div or section, paragraph for p elements etc. We were asked to add this role to make it easier and faster for out-of-process clients, like Orca on Linux, to find landmarks without having to query each and every accessible for its attributes to find out if it has an appropriate xml-roles attribute. This was added to IA2 1.3, to ATK, and is by now also part of the Core-AM and HTML-AM specifications. We added this in Firefox 65 and expand upon it in Firefox 70.

@JulienCochuyt
Copy link
Collaborator

For NVDA, object mostly have a single role.
Landmarks can label regions, header banners, navigation menus, and so on.
NVDA treats the landmark as an attribute of an object with one of these roles, not as a role by itself.
In the provided example, NVDA does spot the banner region just fine.
Yet, I guess the object's role should probably not be ROLE_UNKNOWN but something like ROLE_HEADING, ROLE_HEADER or even ROLE_SECTION.

@MarcoZehe
Copy link
Contributor Author

This definition of landmarks has changed for WAI-ARIA 1.1. So these should no longer be exposed as headings, footers, sections, etc., but as a specific role landmark. Because an html:header or html:footer, for example, are also now only to be considered landmarks if they are direct descendants of the body element, as shown in my example above where the second header element is no longer considered a landmark by Firefox. To make that distinction even for HTML elements, without having to look at the xml role, the landmark role was introduced to ATK and IA2. Apple's UA and Microsoft's UIA also map these as any other standard ARIA role, so NVDA should treat the role at least as a generic landmark and continue to use the XML role in this case to determine which landmark it is.

@derekriemer
Copy link
Collaborator

data:text/html,

a
b
NVDA says region landmark. This is redundant. Is this a bug? If it isn't I'd say it is a major usability issue.

@LeonarddeR
Copy link
Collaborator

LeonarddeR commented Oct 30, 2019 via email

@JulienCochuyt
Copy link
Collaborator

@LeonarddeR wrote:

jup, I will fix the region thing as well. Just waiting for the entering/exiting debate to get finished.

May I please ask where is this debate taking place or what are the main arguments? (I might have too many lists subscriptions or not followed the right threads)

@LeonarddeR
Copy link
Collaborator

That's in #10420. Fixes for the reported issues here are in #10444

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants