Skip to content

Commit

Permalink
Update back-to-top SVG arrow attributes
Browse files Browse the repository at this point in the history
It was recommended on GOVUK Accounts team's DAC report that
focusable="false" and aria-hidden="true" are added to the "up arrow" SVG
on our Privacy notice and Accessibility statement page.
This is because SVGs are in tab sequence in IE, which means that focus
disappears as it sequences over them. Adding focusable="false" ensures
the SVG is not in tab sequence, while aria-hidden="true" ensures that it
is hidden from screen readers.
danacotoran committed Mar 12, 2021
1 parent 3ee554e commit d2af8ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/components/_back-to-top.html.erb
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
%>
<a class="govuk-link app-c-back-to-top dont-print"
href="<%= href %>">
<svg class="app-c-back-to-top__icon" xmlns="http://www.w3.org/2000/svg" width="13" height="17" viewBox="0 0 13 17">
<svg class="app-c-back-to-top__icon" xmlns="http://www.w3.org/2000/svg" width="13" height="17" viewBox="0 0 13 17" aria-hidden="true" focusable="false">
<path fill="currentColor" d="M6.5 0L0 6.5 1.4 8l4-4v12.7h2V4l4.3 4L13 6.4z"/>
</svg>
<%= text %>

0 comments on commit d2af8ab

Please sign in to comment.