mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-04 09:21:41 -05:00
Merge pull request #2192 from GSA/2124-send-message-a11y-audit-error-messages-not-reading-correctly-in-voiceover
Added errors focus to empty field
This commit is contained in:
@@ -483,6 +483,7 @@ def send_one_off_step(service_id, template_id, step_index):
|
||||
link_to_upload=(
|
||||
request.endpoint == "main.send_one_off_step" and step_index == 0
|
||||
),
|
||||
errors=form.errors if form.errors else None
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/components/button/macro.njk" import usaButton %}
|
||||
{% from "components/components/skip-link/macro.njk" import usaSkipLink %}
|
||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||
|
||||
{% set file_contents_header_id = 'file-preview' %}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
{% from "components/table.html" import list_table, field, text_field, hidden_field_heading %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/components/button/macro.njk" import usaButton %}
|
||||
{% from "components/components/skip-link/macro.njk" import usaSkipLink %}
|
||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||
|
||||
{% set file_contents_header_id = 'file-preview' %}
|
||||
|
||||
@@ -12,6 +12,19 @@
|
||||
{{ usaBackLink({ "href": back_link }) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block skipLink %}
|
||||
{% set skipLink = usaSkipLink({
|
||||
"href": '#main-content',
|
||||
"text": 'Skip to main content'
|
||||
}) %}
|
||||
{% if errors %}
|
||||
<div>{{ skipLink }}</div>
|
||||
{% else %}
|
||||
{{ skipLink }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(page_title) }}
|
||||
@@ -24,7 +37,7 @@
|
||||
data_kwargs={'force-focus': True}
|
||||
) %}
|
||||
<div class="grid-row">
|
||||
<div class="grid-col-12 {% if form.placeholder_value.label.text == 'phone number' %}extra-tracking{% endif %}">
|
||||
<div class="grid-col-12 {% if form.placeholder_value.label.text == 'phone number' %}extra-tracking{% endif %}" aria-live="polite" role="alert">
|
||||
{{ form.placeholder_value(param_extensions={"classes": ""}) }}
|
||||
</div>
|
||||
{% if skip_link or link_to_upload %}
|
||||
|
||||
Reference in New Issue
Block a user