Skip to content

Fixed #34643 -- Moved admin form label to a more accessible place. #19713

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add sarah suggestion.
Co-authored-by: Hrushikesh Vaidya <hrushikeshrv@gmail.com>
  • Loading branch information
Antoliny0919 and hrushikeshrv committed Aug 9, 2025
commit 665a7a0e77ffdc9158856f35afdba4ead034a682
2 changes: 1 addition & 1 deletion django/contrib/admin/static/admin/css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.form-row {
overflow: hidden;
padding: 10px 0;
padding: 10px;
font-size: 0.8125rem;
border-bottom: 1px solid var(--hairline-color);
}
Expand Down
1 change: 1 addition & 0 deletions docs/releases/6.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ Miscellaneous
* The :option:`collectstatic --clear` command now reports only a summary of
deleted files when ``--verbosity`` is 1. To see the details for each file
deleted, set the ``--verbosity`` flag to 2 or higher.

* In order to improve accessibility of the admin change forms:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In order to improve accessibility of the admin change forms:
* In order to improve accessibility of the admin change forms:


* Form fields are now shown below their respective labels instead of next to
Expand Down
6 changes: 4 additions & 2 deletions tests/admin_views/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -7025,8 +7025,10 @@ def test_form_errors_render_layout(self):
self.selenium.get(
self.live_server_url + reverse("admin:admin_views_language_add")
)
save = self.selenium.find_element(By.CSS_SELECTOR, "div.submit-row input")
save.click()

with self.wait_page_loaded():
self.selenium.find_element(By.NAME, "_save").click()

form_rows = self.selenium.find_elements(By.CSS_SELECTOR, "div.form-row")
for row in form_rows:
error_list = row.find_element(By.CSS_SELECTOR, "ul.errorlist")
Expand Down
Loading