From 68d39bf218dcb7361c1e4b592077ce4f58e46734 Mon Sep 17 00:00:00 2001 From: Sylvain Boissel Date: Fri, 16 Sep 2022 17:57:09 +0200 Subject: [PATCH] A11y minor issues fix (#20) * Attaching modal close button to modal title * Fix minor accessibility issues * Fix accessibility detail * Fix sr-only links with the proper class from the dsfr (fr-sr-only) --- dsfr/templates/dsfr/link.html | 2 +- dsfr/templates/dsfr/quote.html | 2 +- dsfr/test/test_templatetags.py | 4 ++-- example_app/templates/example_app/tags_index.html | 2 +- pyproject.toml | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dsfr/templates/dsfr/link.html b/dsfr/templates/dsfr/link.html index 29a5d4898..e2d63477e 100644 --- a/dsfr/templates/dsfr/link.html +++ b/dsfr/templates/dsfr/link.html @@ -3,5 +3,5 @@ href="{{ self.url }}" {% if self.is_external %} target="_blank" rel="noopener noreferrer"{% endif %} > - {{ self.label }}{% if self.is_external %} Ouvre une nouvelle fenêtre{% endif %} + {{ self.label }}{% if self.is_external %} Ouvre une nouvelle fenêtre{% endif %} \ No newline at end of file diff --git a/dsfr/templates/dsfr/quote.html b/dsfr/templates/dsfr/quote.html index 343dfb424..e60438f3a 100644 --- a/dsfr/templates/dsfr/quote.html +++ b/dsfr/templates/dsfr/quote.html @@ -10,7 +10,7 @@ {% for detail in self.details %} {% if detail.link %} -
  • {{ detail.text }} Ouvre une nouvelle fenêtre
  • +
  • {{ detail.text }} Ouvre une nouvelle fenêtre
  • {% else %}
  • {{ detail.text }}
  • {% endif %} diff --git a/dsfr/test/test_templatetags.py b/dsfr/test/test_templatetags.py index 07ea13b41..2a4519743 100644 --- a/dsfr/test/test_templatetags.py +++ b/dsfr/test/test_templatetags.py @@ -451,7 +451,7 @@ def test_link_tag_rendered(self): href="http://example.com" target="_blank" rel="noopener noreferrer" > - Label of the link item Ouvre une nouvelle fenêtre + Label of the link item Ouvre une nouvelle fenêtre """, rendered_template, @@ -491,7 +491,7 @@ def test_quote_tag_rendered(self): Système de Design de l'État
  • Detail sans lien
  • -
  • Detail avec lien Ouvre une nouvelle fenêtre
  • +
  • Detail avec lien Ouvre une nouvelle fenêtre
  • diff --git a/example_app/templates/example_app/tags_index.html b/example_app/templates/example_app/tags_index.html index 1831d9b0d..425d2d64e 100644 --- a/example_app/templates/example_app/tags_index.html +++ b/example_app/templates/example_app/tags_index.html @@ -34,7 +34,7 @@

    Composants encore non implémentés

    diff --git a/pyproject.toml b/pyproject.toml index 952564c2b..6b0e7068d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,8 +3,7 @@ authors = ["Sylvain Boissel "] description = "Integrate the French government Design System into a Django app" license = "MIT" name = "django-dsfr" -version = "0.9.1" - +version = "0.9.2" classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Web Environment",