mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-17 13:09:49 -04:00
Accessibility audit uncovered issues screen-reader users would have with autofocus on Notify pages. Autofocus can lead to confusion for those types of users and make them miss parts of the page. Hence, we decided that autofocus will be turned off by default for live-search component. We decided to keep the autofocus on for live-search text box when: 1. the page is a task page - as opposed to browsing pages, where user wonders freely, task pages have more established flow, so page focusing on textbox can actually be helpful. 2. page does not have actionable elements above the autofocus.
37 lines
1.1 KiB
HTML
37 lines
1.1 KiB
HTML
{% extends "views/platform-admin/_base_template.html" %}
|
|
{% from "components/page-header.html" import page_header %}
|
|
{% from "components/live-search.html" import live_search %}
|
|
{% from "components/button/macro.njk" import govukButton %}
|
|
|
|
{% set page_title = "Email branding" %}
|
|
|
|
{% block per_page_title %}
|
|
{{ page_title }}
|
|
{% endblock %}
|
|
|
|
{% block platform_admin_content %}
|
|
|
|
<h1 class="heading-medium">{{ page_title }}</h1>
|
|
{{ live_search(target_selector='.email-brand', show=True, form=search_form, autofocus=True) }}
|
|
<nav>
|
|
{% for brand in email_brandings %}
|
|
<div class="email-brand">
|
|
<div class="message-name">
|
|
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.update_email_branding', branding_id=brand.id) }}">
|
|
{{ brand.name or 'Unnamed' }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</nav>
|
|
<div class="js-stick-at-bottom-when-scrolling">
|
|
{{ govukButton({
|
|
"element": "a",
|
|
"text": "New brand",
|
|
"href": url_for('.create_email_branding'),
|
|
"classes": "govuk-button--secondary"
|
|
}) }}
|
|
</div>
|
|
|
|
{% endblock %}
|