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

2.3.2 Information for User Agents: account for aria-owns #1151

Closed
WilcoFiers opened this issue Jan 15, 2020 · 3 comments · Fixed by #1224
Closed

2.3.2 Information for User Agents: account for aria-owns #1151

WilcoFiers opened this issue Jan 15, 2020 · 3 comments · Fixed by #1224
Assignees
Labels
Agenda has PR PR exists that will close this issue WR comments
Milestone

Comments

@WilcoFiers
Copy link
Contributor

WilcoFiers commented Jan 15, 2020

Bullet 4 says:

source: https://www.w3.org/TR/wai-aria-1.2/#managingfocus_useragents
For any element with an ID attribute, where the element is a descendant of an element with the aria-activedescendant attribute

In the description of aria-activedescendant it is indicated that authors are also permitted to use elements referenced through aria-owns, or any descendant of them. It seems like those elements should also be included here.

A similar issue exists for bullet 2. A in the second list of 2.3.2:

Otherwise, if the current element has an ID and an ancestor with the aria-activedescendant attribute present, and that ancestor is focusable, the user agent MUST set DOM focus to that ancestor.

@jnurthen jnurthen added this to the ARIA 1.2 milestone Jan 16, 2020
@accdc
Copy link
Contributor

accdc commented Feb 14, 2020

Hi,
As requested during the last ARIA call, I've reviewed the user agent document, and there are many areas where references to aria-activedescendant will need to be changed.

Within section: 2.3.2 Information for User Agents

"For any element with an ID attribute, where the element is a descendant of an element with the aria-activedescendant attribute, apply the following accessibility API states to the target to ensure the object is accessible:"

"Focused, whenever the container element sets aria-activedescendant to match the ID of this descendant and the container widget with aria-activedescendant has DOM focus."

"Otherwise, if the current element has an ID and an ancestor with the aria-activedescendant attribute present, and that ancestor is focusable, the user agent MUST set DOM focus to that ancestor."

"The inability to set DOM focus to the containing element indicates an author error."

"Otherwise, the user agent MAY attempt to set DOM focus to the child element itself."

"If the current element has an ID and an ancestor with the aria-activedescendant attribute present, the user agent MUST set the accessibility API focused state and fire an accessibility API focus event on the new active descendant."

Within section: application (role)

"updating the value of aria-activedescendant to reference the element containing the focused content."

Within section: aria-activedescendant (property)

"The aria-activedescendant property provides an alternative method of managing focus for interactive elements that may contain multiple focusable descendants, such as menus, grids, and toolbars. Instead of moving DOM focus among descendant elements, authors MAY set DOM focus on an element that supports aria-activedescendant and then use aria-activedescendant to refer to the element that is active."

"The value of aria-activedescendant refers to an element that is either a descendant of the element with DOM focus or is a logical descendant as indicated by the aria-owns attribute."

Within section: 7.2 Including Elements in the Accessibility Tree

"Elements that are focusable, or have an ID attribute and an ancestor with the aria-activedescendant attribute that matches the implicit or explicit semantics of the required context role."

Within section: 9.2 States and Properties

"Determining whether aria-activedescendant actually points to a DOM descendant or owned element."

All of the above statements are what the spec currently says.

Below, I've taken a stab at modifying the text for all of these, to bring the attribute descriptions into line with what the attribute is now used for.

Within section: 2.3.2 Information for User Agents

"For any element with an ID attribute, where the element is a descendant of an element or controlled by an element with the aria-activedescendant attribute, apply the following accessibility API states to the target to ensure the object is accessible:"

"Focused, whenever the container element sets aria-activedescendant to match the ID of this descendant or controlled element, and the container widget with aria-activedescendant has DOM focus."

"Otherwise, if the current element has an ID and an ancestor or controlling element with the aria-activedescendant attribute present, and that ancestor or controlling element is focusable, the user agent MUST set DOM focus to that ancestor or controlling element."

"The inability to set DOM focus to the containing or controlling element indicates an author error."

"Otherwise, the user agent MAY attempt to set DOM focus to the child or controlled element itself."

"If the current element has an ID and an ancestor or controlling element with the aria-activedescendant attribute present, the user agent MUST set the accessibility API focused state and fire an accessibility API focus event on the new active element."

Within section: application (role)

"updating the value of aria-activedescendant to reference the element contained or controlled by the focused element."

Within section: aria-activedescendant (property)

"The aria-activedescendant property provides an alternative method of managing focus for interactive elements that may contain or control multiple focusable elements, such as menus, grids, and toolbars. Instead of moving DOM focus among descendant or controlled elements, authors MAY set DOM focus on an element that supports aria-activedescendant and then use aria-activedescendant to refer to the element that is active."

"The value of aria-activedescendant refers to an element that is either a descendant of the element with DOM focus, a logical descendant as indicated by the aria-owns attribute, or is a controlled element as indicated by the aria-controls attribute to reference the container of the controlled elements."

Within section: 7.2 Including Elements in the Accessibility Tree

"Elements that are focusable, or have an ID attribute and an ancestor or controlling element with the aria-activedescendant attribute that matches the implicit or explicit semantics of the required context role."

Within section: 9.2 States and Properties

"Determining whether aria-activedescendant actually points to a DOM descendant, an owned element, or a controlled element."

@carmacleod
Copy link
Contributor

The ARIA Working Group just discussed 2.3.2 Information for User Agents: account for aria-owns.

The full IRC log of that discussion <carmacleod> github: https://github.com//issues/1151
<carmacleod> jamesn: Bryan did analysis, what do we need to do with this?
<carmacleod> bryan: mainly editorial
<carmacleod> jamesn: bryan can you do a pr?
<carmacleod> bryan: don't think I have time
<carmacleod> jamesn: I will take it, since you have done the work and put the comments in the issue

@mcking65
Copy link
Contributor

mcking65 commented Apr 9, 2020

@accdc commented:

As requested during the last ARIA call, I've reviewed the user agent document, and there are many areas where references to aria-activedescendant will need to be changed.

Within section: application (role)

"updating the value of aria-activedescendant to reference the element containing the focused content."

This one should not change; elements with application role must own (not control) an element referenced by aria-activedescendant.

Within section: aria-activedescendant (property)

"The aria-activedescendant property provides an alternative method of managing focus for interactive elements that may contain multiple focusable descendants, such as menus, grids, and toolbars. Instead of moving DOM focus among descendant elements, authors MAY set DOM focus on an element that supports aria-activedescendant and then use aria-activedescendant to refer to the element that is active."

This does not need to change; it is entirely accurate whether the interactive element for which focus is being managed is the owning element or a controlled element.

Within section: 7.2 Including Elements in the Accessibility Tree

"Elements that are focusable, or have an ID attribute and an ancestor with the aria-activedescendant attribute that matches the implicit or explicit semantics of the required context role."

This one is covered by #1100.

Within section: 9.2 States and Properties

"Determining whether aria-activedescendant actually points to a DOM descendant or owned element."
All of the above statements are what the spec currently says.
Below, I've taken a stab at modifying the text for all of these, to bring the attribute descriptions into line with what the attribute is now used for.

Within section: 2.3.2 Information for User Agents

"For any element with an ID attribute, where the element is a descendant of an element or controlled by an element with the aria-activedescendant attribute, apply the following accessibility API states to the target to ensure the object is accessible:"

This needs to be tweaked just a little to be:

"For any element with an ID attribute, where the element is a descendant of an element with the aria-activedescendant property, or the element is a descendant of an element controlled by an element with the aria-activedescendant attribute, apply the following accessibility API states to the target to ensure the object is accessible:"

However, the original text is rather ambiguous, especially since the meaning of target is not clear. Target is referring to the element with the ID attribute. I suggest instead:

"Apply the following accessibility API states to any element with an ID attribute that is also either a descendant of an element with the aria-activedescendant property or is a descendant of an element controlled by an element with the aria-activedescendant attribute:"

"Otherwise, if the current element has an ID and an ancestor or controlling element with the aria-activedescendant attribute present, and that ancestor or controlling element is focusable, the user agent MUST set DOM focus to that ancestor or controlling element."

This also needs a little tweaking:

"Otherwise, if the current element has an ID and either an ancestor with the aria-activedescendant property or an ancestor controlled by an element with the aria-activedescendant property present, and the element with the aria-activedescendant property is focusable, the user agent MUST set DOM focus to the element with the aria-activedescendant property."

Within section: application (role)

"updating the value of aria-activedescendant to reference the element contained or controlled by the focused element."

This should not change because an element with role application may use aria-activedescendant only to refer to owned elements.

Within section: aria-activedescendant (property)

"The aria-activedescendant property provides an alternative method of managing focus for interactive elements that may contain or control multiple focusable elements, such as menus, grids, and toolbars. Instead of moving DOM focus among descendant or controlled elements, authors MAY set DOM focus on an element that supports aria-activedescendant and then use aria-activedescendant to refer to the element that is active."

Do not make this change; it is not quite accurate. The aria-activedescendant property may refer to descendants of a controlled element but not directly to the controlled element. And, it may only do so if the controlling element is a combobox, textbox, or searchbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda has PR PR exists that will close this issue WR comments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants