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

Clarify the implications and limitations of aria-owns #1817

Open
WilcoFiers opened this issue Sep 23, 2022 · 3 comments
Open

Clarify the implications and limitations of aria-owns #1817

WilcoFiers opened this issue Sep 23, 2022 · 3 comments
Assignees
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Milestone

Comments

@WilcoFiers
Copy link
Contributor

This follows a conversation with @smhigley here: #1454 (comment)

That PR is doing an excellent job of clarifying the intended parent/child relationship between certain roles, and it introduces a definition for owned children. This raises the question though of who owns an element. Take this example:

<ul id="list1"> <li id="item">Hello</li> </ul>
<ul id="list2" aria-owns="item"></ul>
<ul id="list3" aria-owns="item"></ul>

The way the spec is currently phrased suggests an element can be owned by more than one element. I.e. there is no exception saying that an element referenced with aria-owned is no longer owned by its ancestors too. There's also nothing suggesting that aria-owns can't be used on the same element more than once. Common sense suggests the same element can't be in the tree more than once. It would be good to update the spec to be explicit about this.

There are also some other caveats to consider, like elements referencing themselves, or elements causing recursive owning that should probably explicitly be prohibited:

<ul id="list" aria-owns="item"> <li> Item 1</li> </ul>
<li id="item" aria-owns="list"> Nested item 2 </li>
@jnurthen
Copy link
Member

The way the spec is currently phrased suggests an element can be owned by more than one element. I.e. there is no exception saying that an element referenced with aria-owned is no longer owned by its ancestors too.

I believe this is implied but not explicitly stated. It should be.

There's also nothing suggesting that aria-owns can't be used on the same element more than once. Common sense suggests the same element can't be in the tree more than once. It would be good to update the spec to be explicit about this.

"Authors MUST ensure that an element's ID is not specified in more than one other element's aria-owns attribute at any time. In other words, an element can have only one explicit owner."

is more needed?

There are also some other caveats to consider, like elements referencing themselves, or elements causing recursive owning that should probably explicitly be prohibited:

"Authors MUST NOT create circular references with aria-owns." is already in the spec for aria-owns. Is this not enough?

@spectranaut spectranaut added the clarification clarifying or correcting language that is either confusing, misleading or under-specified label Sep 29, 2022
@spectranaut spectranaut added this to the ARIA 1.3 milestone Sep 29, 2022
@spectranaut
Copy link
Contributor

@WilcoFiers
Copy link
Contributor Author

@jnurthen I think the most important thing here is for ARIA to be explicit about an element only having one owning parent. But beyond that I think it would be quite helpful if ARIA could state what user agents should do with invalid ARIA. I don't think it's enough for a standard to say content authors shouldn't make mistakes. They're going to. It helps to know what browsers should do when they made such mistakes. ARIA has some presidence for this in the forms of presentational role conflict.

HTML 5 also defined how to handle malformed HTML. Doing so made a big different to accessibility. I think the same applies here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification clarifying or correcting language that is either confusing, misleading or under-specified
Projects
None yet
Development

No branches or pull requests

3 participants