- From: Paul Grenier via GitHub <noreply@w3.org>
- Date: Thu, 19 Mar 2026 00:36:04 +0000
- To: public-css-archive@w3.org
> The pseudo-classes don't have any effect on the accessibility tree. They are only used to match form fields that are in a specific invalid state.
I didn't explain it well. Best practice is to currently render an input with the error message related by `aria-describedby`. This does not change that. And when someone tries to use it, it will have a worse outcome. Placing several errors together, rendered but hidden, will all read out. JS is still needed to do the connections dynamically for AT.
```html
<label for="password">
Password
<span class="required" aria-hidden="true">*</span>
<span class="sr-only">required</span>
</label>
<input
type="password"
id="password"
name="password"
autocomplete="new-password"
aria-describedby="err"
>
<p class="aside" id="err">Your password needs to have at least eight characters.</p>
```
--
GitHub Notification of comment by AutoSponge
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1525#issuecomment-4086628607 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 19 March 2026 00:36:06 UTC