To address this issue, username inputs should include
`autocapitalize="none"` among the attrs for the username (and possibly
password) fields. I ran into this issue with
`django.contrib.auth.forms.AuthenticationForm`, where
`autocapitalize="none"` could be added to the attrs in the property-based
field. However, I could see the argument for fixing it at the
`UsernameField` so it cascades to other uses (e.g. `UserCreationForm` and
`UserChangeForm`).
--
Ticket URL: <https://code.djangoproject.com/ticket/30236>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:2>
* status: new => assigned
* owner: nobody => pmisteliac
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:3>
Comment (by Nick Pope):
Out of curiosity, is the problem solved by using
{{{autocomplete="username"}}}? There is already #29379 open for that.
Also see a past
[https://github.com/django/django/pull/9245#issuecomment-356712601
comment] regarding setting these attributes on the widgets from the form.
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:4>
Comment (by Clayton Daley):
They all apply to inputs but are different e.g. see
https://uxcellence.com/2014/tweaking-automatic-form-input
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:5>
* has_patch: 0 => 1
Comment:
PR https://github.com/django/django/pull/11117 posted
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:6>
* version: 2.1 => master
* needs_tests: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:7>
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:8>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:9>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9410db968388820e43aa453a640dd4720fff0c0f" 9410db96]:
{{{
#!CommitTicketReference repository=""
revision="9410db968388820e43aa453a640dd4720fff0c0f"
Fixed #30236 -- Made UsernameField render with autocapitalize="none" HTML
attribute.
This prevents automatic capitalization, which is the default behavior in
some browsers.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:10>
Comment (by Nick Pope):
[https://github.com/django/django/pull/11624 PR] to add a release note.
(A release note was added for the `autocomplete` attribute that was
committed more recently and I think it makes sense to highlight that this
common source of irritation has been addressed.)
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:11>
Comment (by felixxm):
This is just a cleanup, I don't think that we need release notes.
`autocomplete` is a new feature that's why it's mentioned in release
notes.
--
Ticket URL: <https://code.djangoproject.com/ticket/30236#comment:12>