[Django] #35482: Username, Email and Password fields should be explicitly set to LTR

26 views
Skip to first unread message

Django

unread,
May 27, 2024, 3:33:27 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid | Owner: nobody
Shojaee |
Type: | Status: new
Cleanup/optimization |
Component: | Version: 5.0
Uncategorized |
Severity: Normal | Keywords: LTR, RTL, Admin
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 1 |
-------------------------------------+-------------------------------------
Regardless of the site's language, Username, Email and Password fields
should be explicitly set to LTR direction in the Admin site. This is
applicable to all RTL languages (Farsi, Arabic, Hebrew, etc).

Currently the solution is to override three forms (UserCreationForm,
UserChangeForm and AdminPasswordChangeForm) as well as one HTML template
(login.html of django.contrib.auth.admin) to achieve this.
--
Ticket URL: <https://code.djangoproject.com/ticket/35482>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 27, 2024, 5:35:04 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* Attachment "test_login_button_centered--login--rtl.png" added.

Django

unread,
May 27, 2024, 5:36:03 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* Attachment "test_first_field_focus--focus-single-widget--rtl.png" added.

Django

unread,
May 27, 2024, 5:49:32 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Sarah Boyce):

I believe what your saying is when a form labels are inline, the labels
shouldn't be to the right of the inputs and should be to the left of them.
Below is what we have currently with the labels rendering to the right of
the inputs.

[[Image(test_first_field_focus--focus-single-widget--rtl.png)]]

When the labels are above the inputs, the current RTL formatting is
correct

[[Image(test_login_button_centered--login--rtl.png)]]


If I have understood correctly, then this should be fixed as part of
#34643 which is to change the field labels to always be above the input
(though we could accept a patch to fix the css in this case as that's
quite a large change).

I'm not a RTL user myself, Omid Shojaee can you confirm whether my
understanding is correct? I'm assuming you are a RTL user 🙂
--
Ticket URL: <https://code.djangoproject.com/ticket/35482#comment:1>

Django

unread,
May 27, 2024, 5:51:06 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin, | Triage Stage:
accessibility | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

* cc: Tom Carrick, Thibaud Colas, Sarah Abderemane (added)
* keywords: LTR, RTL, Admin => LTR, RTL, Admin, accessibility

--
Ticket URL: <https://code.djangoproject.com/ticket/35482#comment:2>

Django

unread,
May 27, 2024, 6:46:10 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin, | Triage Stage:
accessibility | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Omid Shojaee):

No Sarah, I'm talking about the textbox itself. The cursor inside the
textbox must be set to Left-to-Right for Username, Email and Password
fields.
--
Ticket URL: <https://code.djangoproject.com/ticket/35482#comment:3>

Django

unread,
May 27, 2024, 6:54:50 AM5/27/24
to django-...@googlegroups.com
#35482: Username, Email and Password fields should be explicitly set to LTR
-------------------------------------+-------------------------------------
Reporter: Omid Shojaee | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: 5.0
Severity: Normal | Resolution:
Keywords: LTR, RTL, Admin, | Triage Stage:
accessibility | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 1
-------------------------------------+-------------------------------------
Comment (by Omid Shojaee):

I need to add that in an RTL site, all textbox and textfield elements
should be RTL as well. However, for those specific fields, the direction
of the cursor should be LTR. This is simply because only English
characters are used there. I can't have Farsi password or use Farsi
characters in my email address.
--
Ticket URL: <https://code.djangoproject.com/ticket/35482#comment:4>
Reply all
Reply to author
Forward
0 new messages