You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not set on the name, etc. But the general idea is to encapsulate aria-owns and allowing easy test patterns for interactive content referenced by aria-owns.
Example: In ARIA 1.1, the combobox role has at most 2 owned elements: a textbox and a popup. The textbox is can be selected via a query such as screen.getByRole('role', { name }).querySelector('input') or screen.getByLabelText(name, { selector: 'input' }). However, this does not really test the aria-owns property.
I think we can do better than using a input selector. What about:
Step 1. Get element with aria-owns.
Step 2. Get all owned elements.
Step 3. Use a selector to filter/find a particular element.
e.g. screen.getByOwned('combobox', { name }, 'textbox')?
The text was updated successfully, but these errors were encountered:
Not set on the name, etc. But the general idea is to encapsulate
aria-owns
and allowing easy test patterns for interactive content referenced byaria-owns
.Example: In ARIA 1.1, the combobox role has at most 2 owned elements: a textbox and a popup. The textbox is can be selected via a query such as
screen.getByRole('role', { name }).querySelector('input')
orscreen.getByLabelText(name, { selector: 'input' })
. However, this does not really test thearia-owns
property.I think we can do better than using a input selector. What about:
aria-owns
.e.g.
screen.getByOwned('combobox', { name }, 'textbox')
?The text was updated successfully, but these errors were encountered: