From c5944ea4fe37f7dad1c6ae512783ab625a44ff97 Mon Sep 17 00:00:00 2001 From: Greg Tyler Date: Tue, 17 May 2022 10:36:22 +0100 Subject: [PATCH] fix: markup Banner components as regions Banner components are given the region role and an appropriate label to identify them. The label is taken from, in order or priority: - The `iconFallbackText` label, if set - The type of banner (e.g. "success", "warning", "information") - The word "banner" I also removed the visually-hidden insertion `iconFallbackText` to avoid duplication: if provided, this is now the region's label. --- src/moj/components/banner/template.njk | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/moj/components/banner/template.njk b/src/moj/components/banner/template.njk index ed1cf0f46..9bf697ae8 100644 --- a/src/moj/components/banner/template.njk +++ b/src/moj/components/banner/template.njk @@ -1,4 +1,4 @@ -
+
{% if params.type == 'success' %} @@ -10,10 +10,7 @@ {% endif %}
- {% if params.iconFallbackText %}{{params.iconFallbackText}}{% endif %} {{- params.html | safe if params.html else params.text -}}
- -