Dom-testing-library: querying aria-role superclass hierarchies

Created on 4 Feb 2020  路  6Comments  路  Source: testing-library/dom-testing-library

getByRole should be able to understand superclass hierarchies such as:

input      [abstract, debatable whether this should be queryable?]
  checkbox
    switch   (should be able to get switch by switch, checkbox, or input)
  option
  radio
  slider
  spinbutton
  textbox

Looks related to #446

Examples: https://codesandbox.io/s/young-tree-68kbl

enhancement help wanted

All 6 comments

Not sure whether to label this as a bug or enhancement, but either way, this would be great :)

Actually, I feel like this should be something that aria-query or dom-accessibility-api should handle 馃

It's definitely an enhancement though :)

Sounds like aria-query provides this functionality

If it sounds good to all of you, I could try to make this enhancement!

That sounds great to me @delca85!

We've decided to not implement this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Pau1fitz picture Pau1fitz  路  4Comments

rbrtsmith picture rbrtsmith  路  4Comments

ruscal picture ruscal  路  3Comments

nicolasschabram picture nicolasschabram  路  3Comments

JeffBaumgardt picture JeffBaumgardt  路  4Comments