a11y.css
a11y.css copied to clipboard
:has() use cases
Probably tons of new tests to find, using :has(). A few resources:
-
"The CSS
:has()selector is way more than a “Parent Selector”" by Bramus. -
"Meet
:has(), A Native CSS Parent Selector (And More)" by Adrian Bece on Smashing Magazine. -
"CSS
:has()a parent selector now" by Matthias Ott.
Checking for some patterns based on nesting elements, or some ARIA design patterns, should become possible!
Also it'd allow to drop the current %a11y-reset placeholder.
@KittyGiraudel opens a new door checking details:not(:has(> summary)):not([tabindex^="-"]) in focusable-selectors. Checking for required children (apart from their focusability) is a new step forward validating HTML through CSS.
Need time to play with this :)