diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/intro/tutorial07.txt | 2 | ||||
| -rw-r--r-- | docs/ref/contrib/admin/index.txt | 6 | ||||
| -rw-r--r-- | docs/releases/5.0.txt | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/docs/intro/tutorial07.txt b/docs/intro/tutorial07.txt index 71c13180fe..7810ad7fad 100644 --- a/docs/intro/tutorial07.txt +++ b/docs/intro/tutorial07.txt @@ -367,7 +367,7 @@ a section of code like: .. code-block:: html+django {% block branding %} - <h1 id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></h1> + <div id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a><div> {% endblock %} We use this approach to teach you how to override templates. In an actual diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt index d3c3884329..f8a8153a49 100644 --- a/docs/ref/contrib/admin/index.txt +++ b/docs/ref/contrib/admin/index.txt @@ -2848,9 +2848,13 @@ Templates can override or extend base admin templates as described in .. attribute:: AdminSite.site_header - The text to put at the top of each admin page, as an ``<h1>`` (a string). + The text to put at the top of each admin page, as a ``<div>`` (a string). By default, this is "Django administration". + .. versionchanged:: 5.0 + + In older versions, ``site_header`` was using an ``<h1>`` tag. + .. attribute:: AdminSite.site_title The text to put at the end of each admin page's ``<title>`` (a string). By diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index f6377cd59b..38b49986c5 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -419,6 +419,11 @@ Miscellaneous * :class:`~django.db.models.functions.Now` database function now uses ``LOCALTIMESTAMP`` instead of ``CURRENT_TIMESTAMP`` on Oracle. +* :attr:`.AdminSite.site_header` is now rendered in a ``<div>`` tag instead of + ``<h1>``. Screen reader users rely on heading elements for navigation within + a page. Having two ``<h1>`` elements was confusing and the site header wasn't + helpful as it is repeated on all pages. + .. _deprecated-features-5.0: Features deprecated in 5.0 |
