wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Add tests for `aria-owns` and hiding techniques in assorted scenarios

Open adampage opened this issue 1 year ago • 2 comments

Companion tests for ARIA PR #1839: Clarify relationship between aria-hidden and aria-owns.

In development of that PR, I created a Codepen to manually test a few different scenarios involving combinations of aria-owns, aria-hidden, and host language hiding techniques.

This PR is my attempt to translate those scenarios into roughly comparable WPT tests. In the Codepen, I rendered a bunch of generic elements and manually tested their exposure in the accessibility tree as static text nodes.

In porting those scenarios into to this PR, I decided to leverage WPT’s get_computed_label() function and considered two markup testing approaches: name from author and name from content.

I chose name from content and tweaked each of my markup scenarios to use a parent button element, then compared my expected label to whatever accname was assembled for the button from its contents (involving a bunch of inner aria-owns, aria-hidden, and display: none; nonsense).

adampage avatar Feb 28 '24 03:02 adampage

@adampage, I think you can mark this a "ready for review" because I'm guessing no one has taken a look yet since it is still draft :)

spectranaut avatar May 02 '24 22:05 spectranaut

Thanks, @spectranaut 😅 — done.

adampage avatar May 29 '24 23:05 adampage