Skip to content

Commit

Permalink
[a11y page] Updates accessibility view name everywhere and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AmauryCarrade authored and jpbelval committed Oct 30, 2024
1 parent 5f7e3f5 commit 252b55a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 11 deletions.
2 changes: 1 addition & 1 deletion templates/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
{% endif %}
<li><a href="{% url "pages-contact" %}">{% trans "Contact" %}</a></li>
<li><a href="{% url "pages-cookies" %}">{% trans "Les cookies" %}</a></li>
<li><a href="{% url "pages-accessibilite" %}">{% trans "Accessibilité" %}</a></li>
<li><a href="{% url "pages-accessibility" %}">{% trans "Accessibilité" %}</a></li>
</ul>
</div>
</footer>
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ <h1>{% trans "Déclaration d'accessibilité" %}</h1>

{% block content %}
{% set app.site.association.name as asso_name %}
{% set app.site.email_asso_access as email_asso %}
{% set app.site.email_tech_access as email_tech %}
{% set app.site.email_asso_accessibility as email_asso %}
{% set app.site.email_tech_accessibility as email_tech %}
{% set app.site.dns as site_dns %}
{% set app.site.social.github as url_github %}
{% blocktrans %}
<p>L’association {{asso_name}} s’engage à rendre son site internet accessibles conformément à
<p>L’association {{asso_name}} s’engage à rendre son site internet accessible conformément à
<a href="https://www.legifrance.gouv.fr/loda/article_lc/LEGIARTI000037388867" rel="nofollow">l’article 47 de la loi №&nbsp;2005-102 du 11 février 2005</a>.</p>
{% endblocktrans %}
<p>
Expand All @@ -44,7 +44,7 @@ <h3>{% trans "État de conformité" %}</h3>
{% blocktrans %}Aucun audit n’a été encore effectué. Le site web {{asso_name}} est non-conforme avec le référentiel général d’amélioration de l’accessibilité (RGAA). {% endblocktrans %}
</p>
<p>
{% blocktrans %}Cependant, un audit de conformité est prévu, bien qu’aucune date ne soit connue aujourd’hui. {% endblocktrans %}
{% blocktrans %}Cependant, un audit de conformité est envisagé, sans que l'échéance n'ait été encore définie. {% endblocktrans %}
</p>

<h3>{% trans "Retour d’information et contact" %}</h3>
Expand Down
27 changes: 27 additions & 0 deletions zds/pages/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ def test_url_about(self):

self.assertEqual(result.status_code, 200)

def test_url_accessibility(self):
"""Test: check that accessibility page is alive."""

result = self.client.get(
reverse("pages-accessibility"),
)

self.assertEqual(result.status_code, 200)

def test_url_contact(self):
"""Test: check that contact page is alive."""

Expand Down Expand Up @@ -103,6 +112,15 @@ def test_url_about(self):

self.assertEqual(result.status_code, 200)

def test_url_accessibility(self):
"""Test: check that accessibility page is alive."""

result = self.client.get(
reverse("pages-accessibility"),
)

self.assertEqual(result.status_code, 200)

def test_url_contact(self):
"""Test: check that contact page is alive."""

Expand Down Expand Up @@ -159,6 +177,15 @@ def test_url_about(self):

self.assertEqual(result.status_code, 200)

def test_url_accessibility(self):
"""Test: check that accessibility page is alive."""

result = self.client.get(
reverse("pages-accessibility"),
)

self.assertEqual(result.status_code, 200)

def test_url_contact(self):
"""Test: check that contact page is alive."""

Expand Down
4 changes: 2 additions & 2 deletions zds/pages/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
about,
association,
eula,
accessibilite,
accessibility,
alerts,
cookies,
index,
Expand All @@ -20,7 +20,7 @@
path("technologies/", about, name="pages-technologies"),
path("association/", association, name="pages-association"),
path("contact/", ContactView.as_view(), name="pages-contact"),
path("accessibilite/", accessibilite, name="pages-accessibilite"),
path("accessibilite/", accessibility, name="pages-accessibility"),
path("cgu/", eula, name="pages-eula"),
path("alertes/", alerts, name="pages-alerts"),
path("cookies/", cookies, name="pages-cookies"),
Expand Down
4 changes: 2 additions & 2 deletions zds/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def association(request):


def accessibility(request):
"""Display accessibility's page"""
return render(request, "pages/accessibilite.html")
"""Display accessibility page"""
return render(request, "pages/accessibility.html")


class ContactView(ListView):
Expand Down
4 changes: 2 additions & 2 deletions zds/settings/abstract_base/zds.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
"url": "https://zestedesavoir.com",
"dns": "zestedesavoir.com",
"email_contact": "[email protected]",
"email_asso_access": "[email protected]",
"email_tech_access": "[email protected]",
"email_asso_accessibility": "[email protected]",
"email_tech_accessibility": "[email protected]",
"email_noreply": "[email protected]",
"forum_feedback_users": "/forums/communaute/bug-suggestions/",
"contribute_link": "https://docs.zestedesavoir.com/contributing.html",
Expand Down

0 comments on commit 252b55a

Please sign in to comment.