From 6389a61fa209f305882beb21786a60070ee8ef23 Mon Sep 17 00:00:00 2001 From: Jiro Ghianni Date: Tue, 25 Jun 2024 17:40:55 +0200 Subject: [PATCH 1/3] [#2379] Made Search feedback notification focusable for screenreaders --- src/open_inwoner/cms/cases/tests/test_htmx.py | 2 +- .../components/templates/components/Form/Error.html | 2 +- .../templates/components/Notification/Notification.html | 4 ++-- src/open_inwoner/js/components/notifications/index.js | 8 ++++++-- src/open_inwoner/scss/components/Grid/Grid.scss | 6 ++++++ .../scss/components/Notification/_Notification.scss | 6 ++++++ src/open_inwoner/templates/pages/search.html | 2 +- 7 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/open_inwoner/cms/cases/tests/test_htmx.py b/src/open_inwoner/cms/cases/tests/test_htmx.py index 5f4c3531a6..b968d61fe1 100644 --- a/src/open_inwoner/cms/cases/tests/test_htmx.py +++ b/src/open_inwoner/cms/cases/tests/test_htmx.py @@ -594,7 +594,7 @@ def mock_upload(request, context): upload_form = page.locator("#document-upload") file_input = upload_form.get_by_label("Sleep of selecteer bestanden") submit_button = upload_form.get_by_role("button", name=_("Upload documenten")) - notification_list = page.get_by_role("alert").get_by_role("list") + notification_list = page.locator(".notification").get_by_role("list") notification_list_items = notification_list.get_by_role("listitem") file_list = page.get_by_role("list").last file_list_items = file_list.get_by_role("listitem") diff --git a/src/open_inwoner/components/templates/components/Form/Error.html b/src/open_inwoner/components/templates/components/Form/Error.html index 8d90046f0d..6542a11f9a 100644 --- a/src/open_inwoner/components/templates/components/Form/Error.html +++ b/src/open_inwoner/components/templates/components/Form/Error.html @@ -4,7 +4,7 @@
{% icon icon="warning_amber" icon_position="before" outlined=True %} -
+

{{ message.message }}

diff --git a/src/open_inwoner/components/templates/components/Notification/Notification.html b/src/open_inwoner/components/templates/components/Notification/Notification.html index cea1fa2d00..ecb6d30c75 100644 --- a/src/open_inwoner/components/templates/components/Notification/Notification.html +++ b/src/open_inwoner/components/templates/components/Notification/Notification.html @@ -1,12 +1,12 @@ {% load i18n utils button_tags icon_tags button_tags icon_tags %} -