From 66e183106da5a84fe689a9294b190aaa45f68ce0 Mon Sep 17 00:00:00 2001 From: Andrei Satsevich Date: Sat, 23 Dec 2023 17:14:49 +0300 Subject: [PATCH 01/23] Improve accessibility with ARIA attrs in base.html --- .../templates/debug_toolbar/base.html | 59 +++++++++++-------- 1 file changed, 36 insertions(+), 23 deletions(-) diff --git a/debug_toolbar/templates/debug_toolbar/base.html b/debug_toolbar/templates/debug_toolbar/base.html index 5447970af..59cafd5d8 100644 --- a/debug_toolbar/templates/debug_toolbar/base.html +++ b/debug_toolbar/templates/debug_toolbar/base.html @@ -1,38 +1,51 @@ {% load i18n static %} + {% block css %} - - + + {% endblock %} + {% block js %} - + {% endblock %} +
-
-
    -
  • {% trans "Hide" %} »
  • - {% for panel in toolbar.panels %} - {% include "debug_toolbar/includes/panel_button.html" %} - {% endfor %} -
-
-
-
- DJDT + {{ toolbar.config.ROOT_TAG_EXTRA_ATTRS|safe }} + aria-live="polite" + role="status" + aria-busy="{% if toolbar.config.SHOW_COLLAPSED %}true{% else %}false{% endif %}"> + + -
- {% for panel in toolbar.panels %} - {% include "debug_toolbar/includes/panel_content.html" %} - {% endfor %} -
+
+
+ DJDT +
+
+ + {% for panel in toolbar.panels %} + {% include "debug_toolbar/includes/panel_content.html" %} + {% endfor %} + +
From ea42f150896d2780d9eb971f59872cdf45b20c55 Mon Sep 17 00:00:00 2001 From: Andrei Satsevich Date: Sat, 23 Dec 2023 17:15:38 +0300 Subject: [PATCH 02/23] Improve accessibility with ARIA atts in redirect --- debug_toolbar/templates/debug_toolbar/redirect.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug_toolbar/templates/debug_toolbar/redirect.html b/debug_toolbar/templates/debug_toolbar/redirect.html index 96b97de2d..cb5eb1f64 100644 --- a/debug_toolbar/templates/debug_toolbar/redirect.html +++ b/debug_toolbar/templates/debug_toolbar/redirect.html @@ -5,9 +5,9 @@ Django Debug Toolbar Redirects Panel: {{ status_line }} - +

{{ status_line }}

-

{% trans "Location:" %} {{ redirect_to }}

+

{% trans "Location:" %} {{ redirect_to }}

{% trans "The Django Debug Toolbar has intercepted a redirect to the above URL for debug viewing purposes. You can click the above link to continue with the redirect as normal." %}

From f28f6b0070d7a73a8ef57874025714ce8dce1311 Mon Sep 17 00:00:00 2001 From: Andrei Satsevich Date: Sat, 23 Dec 2023 17:24:12 +0300 Subject: [PATCH 03/23] Improve a11y with ARIA atts in panel_button --- .../templates/debug_toolbar/includes/panel_button.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debug_toolbar/templates/debug_toolbar/includes/panel_button.html b/debug_toolbar/templates/debug_toolbar/includes/panel_button.html index 344331d8d..7d5816520 100644 --- a/debug_toolbar/templates/debug_toolbar/includes/panel_button.html +++ b/debug_toolbar/templates/debug_toolbar/includes/panel_button.html @@ -1,11 +1,11 @@ {% load i18n %} -
  • - +