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 intent of "required owned elements" #1162

Closed
wants to merge 1 commit into from

Conversation

WilcoFiers
Copy link
Contributor

@WilcoFiers WilcoFiers commented Jan 21, 2020

Change is motivated by issue #1033


💥 Error: 500 Internal Server Error 💥

PR Preview failed to build. (Last tried on Jan 20, 2021, 10:59 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Spec Generator - Spec Generator is the web service used to build specs that rely on ReSpec.

🔗 Related URL

Navigation timeout of 27838 ms exceeded

If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.

@jnurthen jnurthen requested a review from carmacleod January 23, 2020 18:32
@scottaohara scottaohara self-requested a review January 23, 2020 18:33
@jnurthen jnurthen requested review from jongund and removed request for scottaohara January 23, 2020 18:33
@scottaohara scottaohara self-requested a review January 23, 2020 18:33
@jongund

This comment has been minimized.

Copy link
Contributor

@jongund jongund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is my suggested edit:

The role required for all owned children of an element with a container role. For example, an element with the role list will own at least one child element with the role listitem. Authors MUST ensure at least one of the required roles is either a child element or referenced by aria-owns from the container element.

index.html Show resolved Hide resolved
@carmacleod carmacleod linked an issue Mar 2, 2020 that may be closed by this pull request
@JAWS-test
Copy link
Contributor

JAWS-test commented Mar 2, 2020

I think the new definition for "required owned elements" does not work, because it now requires that all descendants of the element must have one of the specified roles, which is not correct.

Example:

  • for table the required owned elements are row and rowgroup. but these are only the required child elements. cell, columnheader and rowheader are also allowed as descendants.

My suggestion would be that no reference is made to "owned elements", but only to the child elements (or to the first descendant element with explicit or implicit role, because child elements with role=presentation should be allowed as descendants).

Alternatively, for "required owned elements" actually all should be specified, i.e. for table

  • rowgroup > row > cell
  • rowgroup > row > columnheader
  • rowgroup > row > rowheader
  • row > cell
  • row > columnheader
  • row > rowheader

The second problem is that not all descendants must have these roles, but that there must be at least one child element with the role. In table, for example, the role caption is also allowed, but not required.

Apart from that, the element with the role cell can contain any element with any role, so that role=table can also contain any descendant element as long as it is guaranteed to be within e.g. row and cell - but this is excluded by the current definition.

@carmacleod
Copy link
Contributor

@JAWS-test Good point. The clause about "or any DOM descendant of the owned child" in the definition of "owned element" creates problems. I will try to come up with another definition of "required owned elements". Thanks for pointing this out.

@carmacleod
Copy link
Contributor

carmacleod commented Mar 2, 2020

I think @jongund's suggested words (which build on @WilcoFiers's words) work:

The role required for all owned children of an element with a container role. For example, an element with the role list will own at least one child element with the role listitem. Authors MUST ensure at least one of the required roles is either a child element or referenced by aria-owns from the container element.

It just needs the markup put back in. I will create a github suggestion using those words.

@@ -470,7 +470,7 @@ <h3>Prohibited States and Properties</h3>
</section>
<section id="mustContain">
<h3>Required Owned Elements</h3>
<p>Any <a>element</a> that will be <a>owned</a> by the element with this <a>role</a>. For example, an element with the role <rref>list</rref> will own at least one element with the role <rref>listitem</rref>.</p>
<p>The <a>role</a> required for all <a>owned</a> children. For example, an element with the role <rref>list</rref> will own at least one element with the role <rref>listitem</rref>. Authors MUST ensure all <a>owned</a> child nodes, and all elements referenced by <pref>aria-owns</pref> from the active element, have at least one of the roles specified in the <em>required owned element</em> for the role of the active element.</p>
Copy link
Contributor

@carmacleod carmacleod Mar 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using @jongund's words, with added markup:

Suggested change
<p>The <a>role</a> required for all <a>owned</a> children. For example, an element with the role <rref>list</rref> will own at least one element with the role <rref>listitem</rref>. Authors MUST ensure all <a>owned</a> child nodes, and all elements referenced by <pref>aria-owns</pref> from the active element, have at least one of the roles specified in the <em>required owned element</em> for the role of the active element.</p>
<p>The <a>role</a> required for all <a>owned</a> children of an element with a container role. For example, an element with role <rref>list</rref> will own at least one element with role <rref>listitem</rref>. Authors MUST ensure at least one of the required roles is either a child element or referenced by <pref>aria-owns</pref> from the container element.</p>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to define "container role"? Do we need this term?

This update includes both "container role" and then ends with "container element".

i'm counting 5 instances of "container role" in the spec now, where those instances could be revised to "container element with role..." or even dropping the word "container".

@JAWS-test
Copy link
Contributor

JAWS-test commented Mar 3, 2020

My question would be whether it is possible to be a little more precise at this point:

  • Are child elements those of the DOM or the Accessibility Tree?
    In the following example, option is not a DOM child element
<div role=listbox>
  <div role=presentation>
    <div role=option>
    </div>
  </div>
</div>
  • Maybe the child element div can even be allowed without role=presentation, because div has no role
  • Must all child elements have one of the required owned roles (as with listbox) or may other child elements also be present (as with table)?

Copy link
Member

@scottaohara scottaohara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the direction that Jon and Carolyn have taken this, but for my comment.

Base automatically changed from master to main January 20, 2021 22:59
@pkra pkra added this to the ARIA 1.3 milestone Jan 12, 2022
@jnurthen
Copy link
Member

this is now overcome by #1454

@jnurthen jnurthen closed this Aug 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify "required owned element"
7 participants