Re: [csswg-drafts] [selectors] pseudo selector to match forms ValidityState (#1525)

How is this not solvable by aria-linking a _container_ of all possible error messages to the input element?

~~~~ html
<input aria-errormessage="errmsg">
<aside id="errmsg">
  …
  <p class="length">Value too short or too long.</p>
  …
</aside>
~~~~
~~~~ css
#errmsg > * {
  display: none;
}
[aria-errormessage="errmsg"]:invalid(too-short, too-long) ~ #errmsg > .length {
  display: revert;
}
~~~~


-- 
GitHub Notification of comment by Crissov
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1525#issuecomment-4148004917 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 28 March 2026 12:37:30 UTC