[Django] #36640: Error messages should use aria-errormessage

4 views
Skip to first unread message

Django

unread,
Oct 4, 2025, 3:19:25 AM (2 days ago) Oct 4
to django-...@googlegroups.com
#36640: Error messages should use aria-errormessage
-------------------------------------+-------------------------------------
Reporter: Tobias Bengfort | Type:
| Cleanup/optimization
Status: new | Component: Forms
Version: 5.2 | Severity: Normal
Keywords: accessibility, ui, | Triage Stage:
forms | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
#32819 added `aria-describedby` to associate help texts and errors with
their inputs. I recently learned that there is also the more specialized
[aria-errormessage](https://www.w3.org/TR/wai-aria-1.2/#aria-
errormessage).

I am not sure if using `aria-describedby` over `aria-errormessage` was a
conscious decision.

One issue might be that `aria-errormessage` seems to be intended for
client side validation. It must be used with `aria-invalid="true"`. See
also https://github.com/w3c/aria/issues/2048 for a discussion of the
differences between `aria-describedby` and `aria-errormessage`.
--
Ticket URL: <https://code.djangoproject.com/ticket/36640>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 4, 2025, 3:23:35 AM (2 days ago) Oct 4
to django-...@googlegroups.com
#36640: Error messages should use aria-errormessage
-------------------------------------+-------------------------------------
Reporter: Tobias Bengfort | Owner: (none)
Type: | Status: new
Cleanup/optimization |
Component: Forms | Version: 5.2
Severity: Normal | Resolution:
Keywords: accessibility, ui, | Triage Stage:
forms | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Description changed by Tobias Bengfort:

Old description:

> #32819 added `aria-describedby` to associate help texts and errors with
> their inputs. I recently learned that there is also the more specialized
> [aria-errormessage](https://www.w3.org/TR/wai-aria-1.2/#aria-
> errormessage).
>
> I am not sure if using `aria-describedby` over `aria-errormessage` was a
> conscious decision.
>
> One issue might be that `aria-errormessage` seems to be intended for
> client side validation. It must be used with `aria-invalid="true"`. See
> also https://github.com/w3c/aria/issues/2048 for a discussion of the
> differences between `aria-describedby` and `aria-errormessage`.

New description:

#32819 added `aria-describedby` to associate help texts and errors with
their inputs. I recently learned that there is also the more specialized
[https://www.w3.org/TR/wai-aria-1.2/#aria-errormessage aria-errormessage].

I am not sure if using `aria-describedby` over `aria-errormessage` was a
conscious decision.

One issue might be that `aria-errormessage` seems to be intended for
client side validation. It must be used with `aria-invalid="true"`. See
also https://github.com/w3c/aria/issues/2048 for a discussion of the
differences between `aria-describedby` and `aria-errormessage`.

--
--
Ticket URL: <https://code.djangoproject.com/ticket/36640#comment:1>
Reply all
Reply to author
Forward
0 new messages