-
Notifications
You must be signed in to change notification settings - Fork 71
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
owned elements definition #302
Comments
With regards to #l1: HTML-AAM for an li with a parent
Perhaps the key in this specific mapping is that it is referencing the "parent" With regard to
So I would think that its a bug if browsers are including the Another, similar question is: how should this example be computed:
What are user agents supposed to do with |
For whatever it is worth, I added some test cases to my a11ysupport.io project for the https://a11ysupport.io/tech/html/li_element I decided to not add test cases for the other examples here because I don't want to list/encourage test cases built around non-standard and potentially invalid HTML. |
Next action: Research how browsers come up with owned elements and what the differences are, so that we can come up with a definition that works relatively well across different browsers. |
Agreed on Auto-WCAG meeting that these are the steps moving forward:
|
Created a codepen for testing here owned elements here: |
@WilcoFiers, is it correctly understood that that your testers are on this now, and we are waiting for them to get back to us? (cc: @JKODU) |
It's one day late, nevertheless, I think I have a solution for our owned elements problem. I have done a lot of research about this, and I think I have a proposal. ProposalThis proposal includes 2 definitions. I choose to define how to determine the "owner" rather than how to determine the "owned" elements (and their order) as this is a far easier definition to write, and that's all we'd need for Auto-WCAG rules. Node in the accessibility treeAny DOM node in the flattened DOM tree that meets the following criteria is a node in the accessibility tree:
Note: Text nodes and pseudo elements can also be part of the accessibility tree, since they have their text content as the accessible name. Owner elementThe owner of a node in the accessibility tree can be determined by checking:
Nodes that are not in the accessibility tree do not have an owner element. Research detailsIn coming up with this research I've tested a lot of browser and screen readers.
Plans for adoptionFirstly, what I am proposing is what I believe should be the definition of an owned element. This is not spec'ed out anywhere. If the Auto-WCAG group thinks this is a sensible proposal, I want to share it with the ARIA working group and the folks working on AOM, to see if we can get them to adopt it. I have had talked with them about the topic already, and they seem open to standardising this part of the accessibility tree. If we agree that this definition is how it should be, then we'll need to make a second decision on if we want to adopt this definition in any of our rules already before any standardisation work has happened. That needs to be a separate question, in order for us not to confuse the "standardisation" question with the "writing rules" question. @kasperisager @JKODU I'd love your feedback. |
Sounds reasonable to me.
Cheers,
Gian
|
Made a few changes. @kasperisager do I take your thumbs up as a full agreement? |
@WilcoFiers Without having done much research myself, I do agree with the proposed definitions. They seem very sensible and are not far from how I would intuitively expect things to work. Kudos! |
Including Wilco's definition from #302
I have updated the definition and rule for #255. @WilcoFiers especially, since you have looked most into this. |
* Create SC1-3-1-aria-required-context-role.md * Update SC1-3-1-aria-required-context-role.md Handled Kasper's comment. * Editorial update per feedback * Removed test case per feedback * Update to Accessibility Support * Cleaner WAI-ARIA references * Editorials per feedback from Kasper * Create owner-element.md * Update owner-element.md * Update rule to use new Owner element definition * Update owner-element.md * Update included-in-the-accessibility-tree.md Including Wilco's definition from #302 * Update owner-element.md * Removed role="none"/"presentation" ... since they just remove the role, not remove the node from the accessibility tree. * Updated test cases to match new definitions * Add note about divergence from WAI-ARIA spec * Update SC1-3-1-aria-required-context-role.md * Editorials * `aria-owns` support added to Accessibility Support * Test case moved from Failed to Inapplicable ... according to Carlos' feedback. * Changed "element" to "node" ... per Wilco's feedback * Disclaimer notes inserted * Note added on hiding elements ... as per comments from Wilco * Editorials per Wilco's comments * Updating to account for competing owned elements Updating definition to cover this edge case: ```html <html> <body> <div aria-owns="child"> Parent </div> <div id="child"> Child 1 </div> <div id="child"> Child 2 </div> </body> </html> ``` Parent owns Child 1 Parent does not own Child 2 * Adding links to definitions * Added link to definition * Rule updated to use new "owned by" definition * Reverting changes to "included in the acc. tree" Removing the "expanded" description of when DOM nodes are included in the accessibility tree, since it was too simplified and only applied to native HTML elements, and not even covering all the edge cases for that technology. The source of truth for this lies within the specs already linked to from the definition. * Added inapplicable test case Inapplicable example added for explicit role that is identical to implicit role. * Added Passed test case * New assumption: role being used to comply to WCAG * Further elaboration of assumption * Editorials per Kasper's comments * Fix incorrect code and descriptions in test cases * Accessibility Support note on empty elements * Editorial: Slight rewording of Expectation As suggested by @kasperisager * Add id to frontmatter of rule * Update template + editorials + note for Appl. Per Wilco's comments * Now tree-crossing ownership for implicit ownership * Added test cases crossing shadow boundaries * Extended description for shadow DOM test cases * Update SC1-3-1-aria-required-context-role.md * Editorials * Editorial: plural for consistency * Change test case description to match test case * Rename SC1-3-1-aria-required-context-role.md to aria-required-context-role-ff89c9.md * Insert link to Understanding 1.3.1 document * Add example to Appl. + change definition links Example "(i.e. `tab` has `tablist` as a required context)" added to Applicability per feedback from Wilco. Rule now also links out to definitions of "implicit semantic role" and "explicit semantic role" that are on their way. * Remove `slot` element from Passed Example 6 * Add content to elements + Add new test case To make it easier for testers to inspect the test cases, content has been added to applicable elements. A test case "Passed Example 7" has been added with an empty element, to ensure that empty elements are also considered applicable by the implementations. * More links to "explicit-role" def. + fix typo * Expectation: Note on superclass/subclass roles * Edit subclass inclusion in required context roles Per discussion on #255 (comment) * Add note about descoping DPUB from applicability * Adding inapplicable DPUB test case * Rename owner-element.md to owned-by.md * Remove note + inclusion i acc. tree for point 1 * Editorials + change test cases Per Wilco's review * Changing Passed Example 5 to pass SC 1.3.1 * chore: update rule to use accessibility tree as input * chore: fix failing tests * Apply suggestions from code review Co-Authored-By: Jean-Yves Moyen <[email protected]> * Update aria-required-context-role-ff89c9.md
WAI-ARIA 1.1 defines owned elements like this:
There is an obvious flaw in this, that it contradicts native semantics and plain logic. Here's an example:
List
#l1
according to ARIA has 2 "owned"listitem
s. Despite that, no browser/assistive technology out there announces this as a list of 2 items. You can change theul
s to adiv[role=list]
and theli
s todiv[role=listitem]
and the problem stays the same. That strongly suggests to me that this definition is wrong, and that Auto-WCAG should not use it.There is also the following case:
Should
#l2
, be counted as having two items? Many browsers do today do this. They do not look at the role when deciding the size of a list. We need to do more research on this, but it might mean that thelistitem
role is superfluous, and requiring it would not be necessary.The text was updated successfully, but these errors were encountered: