From 187a789f99ecbc708de517c6b54d480b68ba59fe Mon Sep 17 00:00:00 2001 From: antoliny0919 Date: Thu, 7 Aug 2025 22:17:50 +0900 Subject: Fixed #34643 -- Moved inputs beneath labels and errors in admin forms. Thanks Sarah Boyce and Jacob Walls for reviews. Co-authored-by: Hrushikesh Vaidya --- docs/intro/_images/admin05t.png | Bin 34301 -> 43712 bytes docs/intro/_images/admin07.png | Bin 18339 -> 17554 bytes docs/intro/_images/admin08t.png | Bin 20706 -> 19985 bytes docs/intro/_images/admin09.png | Bin 6955 -> 9249 bytes docs/intro/_images/admin10t.png | Bin 23087 -> 57196 bytes docs/intro/_images/admin14t.png | Bin 17776 -> 40806 bytes docs/ref/contrib/admin/_images/fieldsets.png | Bin 18267 -> 56736 bytes docs/ref/contrib/admin/_images/raw_id_fields.png | Bin 997 -> 4003 bytes docs/ref/contrib/admin/index.txt | 13 +++++++------ docs/releases/6.1.txt | 18 ++++++++++++++++++ 10 files changed, 25 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/intro/_images/admin05t.png b/docs/intro/_images/admin05t.png index de66ee7746..f4e3214721 100644 Binary files a/docs/intro/_images/admin05t.png and b/docs/intro/_images/admin05t.png differ diff --git a/docs/intro/_images/admin07.png b/docs/intro/_images/admin07.png index b591e82217..b5d9a791fd 100644 Binary files a/docs/intro/_images/admin07.png and b/docs/intro/_images/admin07.png differ diff --git a/docs/intro/_images/admin08t.png b/docs/intro/_images/admin08t.png index b77fdc03c6..23f48fdd41 100644 Binary files a/docs/intro/_images/admin08t.png and b/docs/intro/_images/admin08t.png differ diff --git a/docs/intro/_images/admin09.png b/docs/intro/_images/admin09.png index 16ccff4b41..cf2e9a9e1c 100644 Binary files a/docs/intro/_images/admin09.png and b/docs/intro/_images/admin09.png differ diff --git a/docs/intro/_images/admin10t.png b/docs/intro/_images/admin10t.png index e0376ec700..5533531f16 100644 Binary files a/docs/intro/_images/admin10t.png and b/docs/intro/_images/admin10t.png differ diff --git a/docs/intro/_images/admin14t.png b/docs/intro/_images/admin14t.png index 44ae24fe40..2fea20f5c1 100644 Binary files a/docs/intro/_images/admin14t.png and b/docs/intro/_images/admin14t.png differ diff --git a/docs/ref/contrib/admin/_images/fieldsets.png b/docs/ref/contrib/admin/_images/fieldsets.png index e5bc614f25..5b3f472b8d 100644 Binary files a/docs/ref/contrib/admin/_images/fieldsets.png and b/docs/ref/contrib/admin/_images/fieldsets.png differ diff --git a/docs/ref/contrib/admin/_images/raw_id_fields.png b/docs/ref/contrib/admin/_images/raw_id_fields.png index 7f16b11032..42f1d48fc2 100644 Binary files a/docs/ref/contrib/admin/_images/raw_id_fields.png and b/docs/ref/contrib/admin/_images/raw_id_fields.png differ diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index d52857d6ba..b3c7c2c426 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -418,22 +418,23 @@ subclass:: * ``classes`` A list or tuple containing extra CSS classes to apply to the fieldset. This can include any custom CSS class defined in the project, as well - as any of the CSS classes provided by Django. Within the default admin - site CSS stylesheet, two particularly useful classes are defined: - ``collapse`` and ``wide``. + as the CSS class provided by Django: ``collapse``. Example:: { - "classes": ["wide", "collapse"], + "classes": ["collapse"], } - Fieldsets with the ``wide`` style will be given extra horizontal - space in the admin interface. Fieldsets with a name and the ``collapse`` style will be initially collapsed, using an expandable widget with a toggle for switching their visibility. + .. versionchanged:: 6.1 + + The ``wide`` class has been removed, as it was made obsolete by the + new admin layout. + * ``description`` A string of optional extra text to be displayed at the top of each fieldset, under the heading of the fieldset. diff --git a/docs/releases/6.1.txt b/docs/releases/6.1.txt index 6c6890b811..ef6ae1d424 100644 --- a/docs/releases/6.1.txt +++ b/docs/releases/6.1.txt @@ -99,6 +99,19 @@ Minor features preserve :ref:`named groups ` (e.g. ``choices=[("Group", [("1", "Item")]), ...]``). +* In order to improve accessibility of the admin change forms: + + * Form fields are now shown below their respective labels instead of next to + them. + + * Help text is now shown after the field label and before the field input. + + * Validation errors are now shown after the help text and before the field + input. + + * Checkboxes are an exception to the above changes and continue to be + displayed in their original layout. + :mod:`django.contrib.admindocs` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -380,6 +393,11 @@ backends. * Set the new ``DatabaseFeatures.supports_inspectdb`` attribute to ``False`` if the management command isn't supported. +:mod:`django.contrib.admin` +--------------------------- + +* The ``wide`` class is removed, as it was made obsolete by the new layout. + :mod:`django.contrib.gis` ------------------------- -- cgit v1.3