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

Update Managing Focus "Information for User Agents" section to include 1.2 combobox #1121

Closed
carmacleod opened this issue Nov 26, 2019 · 3 comments
Assignees
Milestone

Comments

@carmacleod
Copy link
Contributor

@mcking65 Please correct me if I am wrong, but I believe that every instance of "ancestor" (4 of them) should be replaced with "ancestor or controller" in the following portion of the Managing Focus "Information for User Agents" section of the ARIA spec:

When an assistive technology uses its platform's acessibility API to request a change of focus, user agents MUST do the following:

Remove the platform's focused state from the previously focused object.
Set the DOM focus:
If the element can take DOM focus, the user agent MUST set the DOM focus to it.
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.
NOTE
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.

If you agree that this is needed, I can create a PR.

@mcking65
Copy link
Contributor

mcking65 commented Dec 2, 2019

Good catch @carmacleod! I agree, except that the wording has to be slightly more complex to be accurate:

if the current element has an ID and either has an ancestor with the aria-activedescendant attribute present or is owned by an element that is controlled by a textbox with the aria-activedescendant attribute present

In this case, "owned by" means is contained by or owned via aria-owns. I think we have it defined that way but that should be double-checked.

@carmacleod carmacleod self-assigned this Dec 2, 2019
@jnurthen jnurthen added this to the ARIA 1.2 milestone Dec 5, 2019
@carmacleod
Copy link
Contributor Author

@mcking65

if the current element has an ID and either has an ancestor with the aria-activedescendant attribute present or is owned by an element that is controlled by a textbox with the aria-activedescendant attribute present

Should we say "combobox" instead of "textbox"? That would cover select-only comboboxes as well.

Actually, maybe we need to say, "combobox, textbox or searchbox" to also cover the case where a textbox or searchbox supports autocomplete behavior?

Are there any more cases where a controller could use aria-activedescendant? i.e. can a role="application" aria-roledescription="map" aria-controls="map" use aria-activedescendant to focus cities on a controlled map? Just wondering if we need to use more generic language?

In this case, "owned by" means is contained by or owned via aria-owns. I think we have it defined that way but that should be double-checked.

We define Owning element as:

An 'owning element' is any DOM ancestor of the element, or any element with an aria-owns attribute which references the ID of the element.

There are still open issues about refining that definition #748, #1150, #1151, #1161.

@carmacleod
Copy link
Contributor Author

Closing, because this is completely covered in @jongund's PR #1224.

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.

3 participants