summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt21
-rw-r--r--docs/releases/5.1.txt6
2 files changed, 22 insertions, 5 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index 2a5652c24b..b7e94c7387 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -424,9 +424,16 @@ subclass::
"classes": ["wide", "collapse"],
}
- Fieldsets with the ``collapse`` style will be initially collapsed in
- the admin and replaced with a small "click to expand" link. Fieldsets
- with the ``wide`` style will be given extra horizontal space.
+ 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:: 5.1
+
+ ``fieldsets`` using the ``collapse`` class now use ``<details>``
+ and ``<summary>`` elements, provided they define a ``name``.
* ``description``
A string of optional extra text to be displayed at the top of each
@@ -2308,8 +2315,12 @@ The ``InlineModelAdmin`` class adds or customizes:
A list or tuple containing extra CSS classes to apply to the fieldset that
is rendered for the inlines. Defaults to ``None``. As with classes
configured in :attr:`~ModelAdmin.fieldsets`, inlines with a ``collapse``
- class will be initially collapsed and their header will have a small "show"
- link.
+ class will be initially collapsed using an expandable widget.
+
+ .. versionchanged:: 5.1
+
+ ``fieldsets`` using the ``collapse`` class now use ``<details>`` and
+ ``<summary>`` elements, provided they define a ``name``.
.. attribute:: InlineModelAdmin.extra
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt
index 68315205df..e4f0b37402 100644
--- a/docs/releases/5.1.txt
+++ b/docs/releases/5.1.txt
@@ -419,6 +419,12 @@ Miscellaneous
a ``<footer>`` tag instead of a ``<div>``, and also moved below the
``<div id="main">`` element.
+* In order to improve accessibility, the expandable widget used for
+ :attr:`ModelAdmin.fieldsets <django.contrib.admin.ModelAdmin.fieldsets>` and
+ :attr:`InlineModelAdmin.fieldsets <django.contrib.admin.InlineModelAdmin>`,
+ when the fieldset has a name and use the ``collapse`` class, now includes
+ ``<details>`` and ``<summary>`` elements.
+
* :meth:`.SimpleTestCase.assertURLEqual` and
:meth:`~django.test.SimpleTestCase.assertInHTML` now add ``": "`` to the
``msg_prefix``. This is consistent with the behavior of other assertions.