Open WilcoFiers opened 4 years ago
Your explanations do not seem to be right for role=presentation
, because this only affects "required owned elements". In a table, for example, it affects <tr>
and <td>
, but not to the elements within the table (nor to nested tables). However, "required owned elements" is somewhat imprecise, since, for example, <th>
is not a required element for a table, but is also affected by role=presentation
.
A role=presentation
at the <body>
has no effect, because <body>
has no required owned elements.
Better would be: If a required ancestor element has a role=presentation
, this is also inherited to the current element.
The ARIA Working Group just discussed Inconsistent use of "owned by"
.
Revisit this after Sarah's PR lands: https://github.com/w3c/aria/pull/1454/files
There are many uses of "owned elements" which should probably be reconsidered and maybe replaced. For example, in spinbutton:
Authors MAY create a spinbutton with children or owned elements, but MUST limit those elements to a textbox and/or two buttons.
Should we simply say "with accessibility children" or "with children" or (maybe) "with owned elements"?
Additionally, "owning element" is not used in the spec, except in tooltip where it's meaning is not even the definition of "owning element":
The tooltip typically becomes visible, after a short delay, in response to a mouse hover, or after the owning element receives keyboard focus
Discussed in F2F meeting yesterday: https://www.w3.org/2023/05/04-aria-minutes#t01
It was decided to remove the terms "owning elements" and "owned element" (especially as owned element is not used) and replace use in the document with the appropriate defined term, with "accessibility child", "accessibility parent" or "accessibility descendant"
This work is blocked on: https://github.com/w3c/aria/issues/1150#issuecomment-1536859008
Reading through the document, there seem to be cases where "owned by" is meant to be either all descendants (as defined) but there are other places where it is strongly implied "owned by" is a parent/child relationship. Firstly, the definition:
But then if we read
menuitem
, it says the following:This last part "or by a role group which ..." doesn't make sense if "owned by" applies to all descendants. If a menu item owns all descendants, it automatically owns a menuitem owned by a group that's a child of the menu. The
menuitem
even owns it, if it's in alist
which is in agrid
which is in aheader
which is in amenu
.And that last part is where I'm starting to have proper concerns. The following seems to be conform to ARIA 1.2:
Even more explicitly, 9.2 basically says that elements are only supposed to have one owned element:
On the other hand, there are places where it matters that "owned elements" aren't just the child elements, but all descendants (or at least, up to a certain level):
In this case, it matters that
aria-readonly
propagates to thecell
of agrid
. Although even here it could be argued thataria-readonly
shouldn't propagate down into nestedgrid
elements. That propagation is far more pronounced for thepresentation
role, and here it really matters if "owned elements" is limited to children, or all descendants:As far as I can tell, browser vendors have taken this to mean all children, and everything directly referenced through
aria-owns
. That's very sensible, otherwise a single misplacedrole="presentation"
on thebody
element could wrack the semantics of the entire page.Proposal
I think the simplest solution here would be to split the "owned elements" definition, into "owned children" and "owned descendants". That seems to address most of these issues. Additionally, you'd have to do something about "presentation" and "none", make it clear those elements can't "own" anything.
We'd also get an answer on whether or not "generic" should be included in the accessibility tree or not. Browsers don't seem to agree on that.
A final little bonus thing would be to make it explicit that element referenced with "aria-owns" are owned children of the first element with that attribute, and that other elements can not own them.