#35706: Improve admin add/change form top level errors for screen readers
-------------------------------------+-------------------------------------
Reporter: Sarah Boyce | Owner: Sanjeev
Type: | Holla S
Cleanup/optimization | Status: assigned
Component: contrib.admin | Version: dev
Severity: Normal | Resolution:
Keywords: accessibility | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Sanjeev Holla S):
Replying to [comment:6 Sarah Boyce]:
> Replying to [comment:5 Sanjeev Holla S]:
> > Also one of my suggestion is to improve the default error message
(which is used when the field is required). As of now the error message
shows "This field is required" for any field. But I am thinking of
changing this to "Enter a %(field_title)s", so that it will be more
informative in the summary box. I have made this change as of now. Let me
know if its not required.
>
> I think updating the error message might not be the way to go as some
people might be relying on it in tests. We probably want something a bit
like `django/forms/templates/django/forms/errors/dict/ul.html`
(specifically `{% for field, error in errors %}<li>{{ field }}{{ error
}}</li>{% endfor %}` as it gets a field and error) but probably requires
some tweaks
>
> If you have done the bit prefixing the word “Error:” to the document’s
<title>, you can add a test and raise a PR with "Refs #35706" as these two
bits can be merged seperatedly
Hey! Got the point. I have created a PR for the first bit. Please check it
and suggest changes if required.
--
Ticket URL: <https://code.djangoproject.com/ticket/35706#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070191a49ebca9-4e3b0931-6559-4d22-b4db-0c6d8624e14e-000000%40eu-central-1.amazonses.com.