digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
68 stars 34 forks source link

Do we use `aria-errormessage` instead of `aria-describedby` #2089

Open mimarz opened 1 month ago

mimarz commented 1 month ago

When do we add support for aria-errormessage, should we even though its not fully supported?

We are currently using aria-invalid in combination with aria-describedby which is also an valid option.

Notes:

Barsnes commented 1 month ago

Since support is sparse, I think we should wait before implemeting this

eirikbacker commented 2 weeks ago

aria-describedby is at least very well supported. Only tip would be to ensure error-message ID is always prepended before help-text-ID in the attribute, so: ✅ aria-describedby="my-error-id my-helptext-id"aria-describedby="my-helptext-id my-error-id"