Opened 8 months ago
Closed 8 months ago
#35375 closed Bug (fixed)
Original line of tabular inline admin is always shown on the left, even in RTL
Reported by: | Eyal Cherevatsky | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 5.0 |
Severity: | Normal | Keywords: | admin, inline, rtl, accessibility |
Cc: | Eyal Cherevatsky | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description
When using a tabular inline admin model, the "original" line (containing the string representation and, optionally, a view/change link) is always show on the left. This is fine in most cases, expect for cases where the language is RTL (right-to-left).
The following CSS, if put in django/contrib/admin/static/admin/css/rtl.css
, should resolve the issue:
.inline-group .tabular td.original p { right: 0; }
Alternatively, instead of having specific styling for RTL, we can use inset-inline-start
instead of left
, which will work correctly for both LTR and RTL. I believe this should be changed here:
https://github.com/django/django/blob/dd238212082f6547d5b03c5af6ec53368c39568e/django/contrib/admin/static/admin/css/forms.css#L458
Attachments (4)
Change History (8)
by , 8 months ago
by , 8 months ago
comment:1 by , 8 months ago
Has patch: | set |
---|
by , 8 months ago
Attachment: | ltr-dark.png added |
---|
by , 8 months ago
Attachment: | rtl-dark.png added |
---|
comment:2 by , 8 months ago
Keywords: | accessibility added |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 8 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
Went for option 1 as the accessibility team is in the process of discussing the use of logical properties, see: https://github.com/django/django/pull/17560
Thank you for the report and the patch!
I think I prefer option 2 but still testing 👍