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

11 views
Skip to first unread message

Django

unread,
Oct 4, 2025, 3:19:25 AM10/4/25
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 AM10/4/25
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>

Django

unread,
Oct 11, 2025, 8:50:18 PM10/11/25
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
-------------------------------------+-------------------------------------
Comment (by Antoliny):

Thank you Tobias :)
I like this proposal.
I looked into the materials you provided and also researched `aria-
errormessage`.

It does seem that providing error messages through a`ria-errormessage`,
instead of including both the error message and help text in `aria-
describedby`, offers more advantages.
However, the problem lies in the support coverage of `aria-errormessage`.

It appears that `aria-errormessage` is not yet supported by macOS
VoiceOver and TalkBack.
While it is supported by screen readers with higher market share( NVDA,
JAWS, and iOS VoiceOver..), I wasn’t able to confidently triage this issue
because of that limitation.

If we switch to using `aria-errormessage`, devices that don’t support it
won’t read out the error message at all, which could actually make the
experience worse than before.
So I think it would be best to get the accessibility team opinion on this.
--
Ticket URL: <https://code.djangoproject.com/ticket/36640#comment:2>

Django

unread,
Oct 12, 2025, 9:28:41 AM10/12/25
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 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Clifford Gama):

* stage: Unreviewed => Someday/Maybe

Comment:

Thanks @Antoliny0919 for the triage. Marking as Someday/Maybe because of
limited coverage.
--
Ticket URL: <https://code.djangoproject.com/ticket/36640#comment:3>

Django

unread,
Oct 20, 2025, 2:38:32 AM10/20/25
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 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Manish Tiwari):

Hello sir, @Antoliny0919 Should I start working on this issue if it's not
assigned??
--
Ticket URL: <https://code.djangoproject.com/ticket/36640#comment:4>

Django

unread,
Oct 20, 2025, 9:11:03 AM10/20/25
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 | Someday/Maybe
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Jacob Walls):

It is probably best to wait until we hear from the accessibility team and
this ticket moves out of "Someday/Maybe" status.
--
Ticket URL: <https://code.djangoproject.com/ticket/36640#comment:5>
Reply all
Reply to author
Forward
0 new messages