From 21999f152adb6f573330b22dc572a36784354bda Mon Sep 17 00:00:00 2001 From: Tom Byers Date: Wed, 3 Nov 2021 10:33:10 +0000 Subject: [PATCH] Remove extra group from remove SVG The SVG used for the 'X' in the remove area button has 2 (group) elements, one wrapping everything and one wrapping the two lines that make the cross. The first isn't needed and means that the SVG ends up with 2 accessible names: 1. the element gets named with the text from the because of it's aria-labelledby attribute referencing it 2. the first gets named with the text from the because the algorithm that gets the name looks for any descendent <title>s This removes the first <g> so only the accessible name for the <svg> gets announced. --- app/templates/views/broadcast/preview-areas.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/views/broadcast/preview-areas.html b/app/templates/views/broadcast/preview-areas.html index d516f7326..99b8ae1fd 100644 --- a/app/templates/views/broadcast/preview-areas.html +++ b/app/templates/views/broadcast/preview-areas.html @@ -32,7 +32,7 @@ <li class="area-list-item"> {{ area.name }} <a class="area-list-item-remove govuk-button" data-module="govuk-button" role="button" href="{{ url_for('.remove_broadcast_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, area_slug=area.id) }}"> - <svg id="area-list-item-remove__icon" width="11" height="11" viewbox="0 0 10 10" aria-labelledby="area__{{ loop.index }}" role="img" xmlns="http://www.w3.org/2000/svg"> <g> + <svg id="area-list-item-remove__icon" width="11" height="11" viewbox="0 0 10 10" aria-labelledby="area__{{ loop.index }}" role="img" xmlns="http://www.w3.org/2000/svg"> <title id="area__{{ loop.index }}">Remove {{ area.name }}