mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Turn autofocus on for setting service branding
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.
This commit is contained in:
@@ -5,14 +5,16 @@
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% set page_title = "Set email branding" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Set email branding
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(
|
||||
'Set email branding',
|
||||
page_title,
|
||||
back_link=url_for('.service_settings', service_id=current_service.id)
|
||||
) }}
|
||||
{% call form_wrapper(data_kwargs={'preview-type': 'email'}) %}
|
||||
@@ -22,7 +24,13 @@
|
||||
</div>
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-full">
|
||||
{{ live_search(target_selector='.multiple-choice', show=True, form=search_form, label='Search branding styles by name') }}
|
||||
{{ live_search(
|
||||
target_selector='.multiple-choice',
|
||||
show=True,
|
||||
form=search_form,
|
||||
label='Search branding styles by name',
|
||||
autofocus=True
|
||||
) }}
|
||||
{{ radios(form.branding_style) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,14 +5,16 @@
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% set page_title = "Set letter branding" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Set letter branding
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(
|
||||
'Set letter branding',
|
||||
page_title,
|
||||
back_link=url_for('.service_settings', service_id=current_service.id)
|
||||
) }}
|
||||
{% call form_wrapper(data_kwargs={'preview-type': 'letter'}) %}
|
||||
@@ -22,7 +24,13 @@
|
||||
</div>
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-full">
|
||||
{{ live_search(target_selector='.multiple-choice', show=True, form=search_form, label='Search by name') }}
|
||||
{{ live_search(
|
||||
target_selector='.multiple-choice',
|
||||
show=True,
|
||||
form=search_form,
|
||||
label='Search by name',
|
||||
autofocus=True
|
||||
) }}
|
||||
{{ radios(form.branding_style, hide_legend=True) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user