A11yance / aria-query

Programmatic access to the ARIA specification
Apache License 2.0
280 stars 44 forks source link

role `separator` can have a superclass of `widget` if focusable #587

Open aloisklink opened 1 week ago

aloisklink commented 1 week ago

Since ARIA 1.1, separator has a superclass of widget if focusable (it looks like it's the only ARIA roles that can have different superclasses).

I'm not sure if it's possible to somehow add this, or if this library assumes that each aria role only has one superclass chain.

There's also a separate issue that aria-valuenow is a required prop if the separator is focusable (see also: https://github.com/A11yance/aria-query/issues/230#issue-1000181175), but again, I don't know you'd be able to add that into the current code-base.


Looks like there's also an issue in https://github.com/w3c/aria/issues/1348 that suggests making a separate role="resizer" to avoid separator acting differently depending on whether it's focusable or not.

cmorten commented 4 days ago

See also https://github.com/A11yance/aria-query/pull/547#discussion_r1526216880 which seems relevant to discussion r.e. superclasses with constraints (in this other case for the form role conditional having a superclass of landmark depending on whether the form is named).