#32340: Usability issues with Django form fields expecting specific patterns
-------------------------------------+-------------------------------------
Reporter: Thibaud Colas | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: accessibility, | Triage Stage: Accepted
usability, forms |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Thibaud Colas):
I have discussed this again with a coworker, and we think that as an
immediate action it would be best to have "accessibility considerations"
as a standalone page in the forms / fields documentation, or cover it
separately for each field, as preferred.
For the issues listed here, this would allow us to:
- Recommend using help_text (or template overrides?) to display the
expected date format, with practical copy-paste-able examples
- At the same time we could briefly mention why this is better than
alternatives (having the format in error messages or as a placeholder
attribute – both better than nothing but poor in comparison).
Additionally, in the future, we could also cover common considerations for
other field types:
- How it’s rarely appropriate to use `type="number"` even if the field
might be storable as a number (see
https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-
team-changed-the-input-type-for-numbers/).
- How a `type=”date”` input should be favoured if browser support for a
given project allows it
And broader considerations that are relevant for all field types:
- Usage of fieldsets
- Usage of autocomplete / autocapitalize attributes
- Visually distinguishing between optional and required fields
---
This goes beyond what I reported here initially, and I’d still personally
prefer something that could be done in Django core directly, but thought
it would be worth mentioning nonetheless.
--
Ticket URL: <https://code.djangoproject.com/ticket/32340#comment:3>
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/070.e167a620beb8d7de7811b0a5552e5fab%40djangoproject.com.