w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
643 stars 124 forks source link

Clarification of distinctions between "contains" and "owned by" concerning roles of list/listitem and associationlist/associationlistitemkey/associationlistitemvalue. #2007

Open giacomo-petri opened 1 year ago

giacomo-petri commented 1 year ago

Question: In relation to element roles such as, though not exclusively, "list/listitem," "grid/row/gridcell," and "table/row/cell," the specifications state:

Authors MUST ensure elements with role $child_role are contained in, or owned by, an element with the role $parent_role.

However, this rule does not hold true for the triad "associationlist/associationlistitemkey/associationlistitemvalue." Is there a specific rationale behind the acceptance of only the "contained in" relationship, rather than incorporating the "owned by" relationship (potentially using aria-owns)? I acknowledge the intricate nature of relationships that hinge on the sequence of elements, yet this also pertains to table/grid structures.


WAI-ARIA version: https://w3c.github.io/aria


Link to documentation:

spectranaut commented 1 year ago

Crazy timing @giacomo-petri -- I think I just opened a PR that resolves your concerns, can you look at: https://github.com/w3c/aria/pull/2010

spectranaut commented 1 year ago

I think I wrote too soon, actually, I see my PR might not totally resolve your concerns, but, we have been working on the confusing language related to required relationships between elements with certain roles. I think the requirements for associationlist and the other roles you mentioned are the same, but the language was perhaps not clear. "associationlist" does have the "required accessibility children" just like list and the other roles you mentioned, can you review the section of "required accessibility children" and the definition for "accessibility children", and let me know if your concern remains? Or let me know if I misunderstood your concern.

giacomo-petri commented 1 year ago

Absolutely, I see the point.

The clarification provided by the definition of "accessibility children" addresses my concern, and the newly proposed #2010 amendment certainly brings clarity to the matter.

However, I do have a reservation regarding the statement concerning the "associationlistitemkey" role. This statement reads:

A single key item in an association list.

Author requirements for elements whose role is associationlistitemkey:

and in particular, it specifically states:

MUST be contained in an element whose role is associationlist.

Contrastingly, for other roles such as the "listitem" role, the specification reads:

Authors MUST ensure elements whose role is listitem are contained in, or owned by, an element whose role is list.

Considering the consistency introduced by your new pull request (#2010), I would suggest applying this new terminology to the "associationlistitemkey" and "associationlistitemvalue" roles as well:

<p>Authors MUST ensure [=elements=] whose <a>role</a> is <code>associationlistitemkey</code> are <a>accessibility children</a> of an <a>element</a> whose <a>role</a> is <rref>associationlist</rref>.</p>

This applies to associationlist and associationlistitemvalue roles as well (of course using appropriate relationship terminology).

This would ensure uniformity and alignment with the evolving standards introduced by PR #2010.

pkra commented 1 year ago

I like the suggested clarification. I expect we have a lot of opportunities to clarify things like this after #2010 lands.

pkra commented 1 year ago

@giacomo-petri might you be willing to make a PR after #2010 lands?

giacomo-petri commented 1 year ago

Absolutely

scottaohara commented 4 months ago

tagging this as role content model - though maybe it's only tangentially related?

giacomo-petri commented 4 months ago

I missed it because it wasn't assigned to me. Now that it is, I'll handle it! 😄

giacomo-petri commented 4 months ago

With this commit, the roles associationlist, associationlistitemkey, and associationlistitemvalue have been removed from the specifications.

All other "owned by" and "contained in" relationships have been appropriately updated to the new "accessibility children" and "accessibility parent" terminology, except for the role caption.

The current specification states:

...

  • The caption is the first non-generic descendant of a grid, group, radiogroup, table, or treegrid. ...

This translates to "The caption is the first accessibility child of a grid, group, radiogroup, table, or treegrid." However, the existing wording is very clear, and we might want to consider retaining it as is.