mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 16:48:25 -04:00
Merge pull request #1963 from GSA/notify-admin-1937b
Fix moderate a11y violations reported by axe-core
This commit is contained in:
@@ -1,2 +1,4 @@
|
|||||||
<a href="{%- if params.href %}{{ params.href }}{% else %}#{% endif -%}" class="usa-link usa-back-link display-inline-flex margin-bottom-3 {%- if params.classes %} {{ params.classes }}{% endif -%}"
|
<nav class="usa-breadcrumb" aria-label="Breadcrumb">
|
||||||
{%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ (params.html | safe if params.html else (params.text if params.text else 'Back')) }}</a>
|
<a href="{{ params.href or '#' }}" class="usa-link usa-back-link display-inline-flex {{ params.classes or '' }}"
|
||||||
|
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}" {% endfor %}>{{ params.html | safe or params.text or 'Back' }}</a>
|
||||||
|
</nav>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{% if help %}
|
{% if help %}
|
||||||
{% include 'partials/tour.html' %}
|
{% include 'partials/tour.html' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<nav class="nav margin-bottom-4">
|
<nav id="nav-main-nav" aria-label="Main navigation" class="nav margin-bottom-4">
|
||||||
<a class="usa-button margin-top-1 margin-bottom-5 width-full"
|
<a class="usa-button margin-top-1 margin-bottom-5 width-full"
|
||||||
href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a>
|
href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a>
|
||||||
<ul class="usa-sidenav">
|
<ul class="usa-sidenav">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<nav class="nav margin-bottom-4">
|
<nav id="nav-org-nav" aria-label="Organization navigation" class="nav margin-bottom-4">
|
||||||
<ul class="usa-sidenav">
|
<ul class="usa-sidenav">
|
||||||
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('dashboard') }}" href="{{ url_for('.organization_dashboard', org_id=current_org.id) }}">Usage</a></li>
|
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('dashboard') }}" href="{{ url_for('.organization_dashboard', org_id=current_org.id) }}">Usage</a></li>
|
||||||
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>
|
<li class="usa-sidenav__item"><a class="usa-link{{ org_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_org_users', org_id=current_org.id) }}">Team members</a></li>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<nav id="nav-service-nav" aria-label="Service navigation">
|
||||||
<div class="navigation-service margin-top-5 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
|
<div class="navigation-service margin-top-5 display-flex flex-align-end flex-justify border-bottom padding-bottom-1">
|
||||||
{% if current_service.organization_id %}
|
{% if current_service.organization_id %}
|
||||||
{% if current_user.platform_admin or
|
{% if current_user.platform_admin or
|
||||||
@@ -13,3 +14,4 @@
|
|||||||
</div>
|
</div>
|
||||||
<a href="{{ url_for('main.choose_account') }}" class="usa-link">Switch service</a>
|
<a href="{{ url_for('main.choose_account') }}" class="usa-link">Switch service</a>
|
||||||
</div>
|
</div>
|
||||||
|
</nav>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<nav id="template-list">
|
<nav id="template-list" aria-label="Template list">
|
||||||
{% set checkboxes_data = [] %}
|
{% set checkboxes_data = [] %}
|
||||||
|
|
||||||
{% if not current_user.has_permissions('manage_templates') %}
|
{% if not current_user.has_permissions('manage_templates') %}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
{{ live_search(target_selector='#template-list .template-list-item', show=True, form=search_form) }}
|
{{ live_search(target_selector='#template-list .template-list-item', show=True, form=search_form) }}
|
||||||
|
|
||||||
<nav id="template-list">
|
<nav id="template-list" aria-label="Choose reply">
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in templates_and_folders %}
|
{% for item in templates_and_folders %}
|
||||||
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
form=search_form,
|
form=search_form,
|
||||||
autofocus=True
|
autofocus=True
|
||||||
) }}
|
) }}
|
||||||
<nav id="template-list">
|
<nav id="template-list" aria-label="Copy template list">
|
||||||
<ul>
|
<ul>
|
||||||
{% for item in services_templates_and_folders %}
|
{% for item in services_templates_and_folders %}
|
||||||
|
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ def test_caseworkers_get_caseworking_navigation(
|
|||||||
client_request.login(active_caseworking_user)
|
client_request.login(active_caseworking_user)
|
||||||
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
||||||
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
||||||
"Send messages Sent messages"
|
"service one Switch service"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -439,5 +439,5 @@ def test_caseworkers_see_jobs_nav_if_jobs_exist(
|
|||||||
client_request.login(active_caseworking_user)
|
client_request.login(active_caseworking_user)
|
||||||
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
page = client_request.get("main.choose_template", service_id=SERVICE_ONE_ID)
|
||||||
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
assert normalize_spaces(page.select_one("header + .grid-container nav").text) == (
|
||||||
"Send messages Sent messages"
|
"service one Switch service"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -29,12 +29,9 @@ def check_axe_report(page):
|
|||||||
|
|
||||||
results = axe.run(page)
|
results = axe.run(page)
|
||||||
|
|
||||||
# TODO we are setting this to critical for now
|
# TODO fix remaining 'moderate' failures
|
||||||
# to keep tests passing. Once the serious and
|
# so we can set the level we skip to minor only
|
||||||
# moderate issues are fixed, we will set this
|
|
||||||
# 'moderate'
|
|
||||||
for violation in results["violations"]:
|
for violation in results["violations"]:
|
||||||
assert violation["impact"] in [
|
assert violation["impact"] in [
|
||||||
"minor",
|
"minor",
|
||||||
"moderate",
|
|
||||||
], f"Accessibility violation: {violation}"
|
], f"Accessibility violation: {violation}"
|
||||||
|
|||||||
Reference in New Issue
Block a user