#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

 I will create a PR for the 2nd bit as well. So I will show the list of
 errors in the summary box in the same way as suggested (without changing
 the default error message and using `{% for field, error in errors
 %}<li>{{ field }}{{ error }}</li>{% endfor %}`). Even this should be added
 in all the templates wherever the prefix "Error:" was added in the title I
 guess.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35706#comment:9>
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/01070191ac203bb1-ac105539-5168-4adb-8398-a0c49fd067a0-000000%40eu-central-1.amazonses.com.

Reply via email to