Skip to content

Commit

Permalink
Update header to use latest markup
Browse files Browse the repository at this point in the history
The markup for the header was changed in alphagov/govuk-frontend#1724:

> role="none"/"presentational" does not do enough to hide the child fallback image used in older browsers.
>
> We have found that Chrome's new "Get image descriptions from Google" feature will notice this fallback image.
>
> This means when screenreaders such as NVDA visit the logo, it'll announce "Unlabelled graphic, To get missing image descriptions, open the context menu." for this fallback image.
>
> By using aria-hidden="true" we can ensure that the SVG and it's children are all hidden from the accessibility tree, which I have confirmed in NVDA + Chrome.

This change went out as part of GOV.UK Frontend v3.6.0. It was missed when updating the Design System to use v3.6.0 in #1187 (it's a non-breaking change, as the existing markup works fine – this is just an improvement)
  • Loading branch information
36degrees committed May 14, 2020
1 parent b900e31 commit 5454153
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/partials/_header.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
treat it as an interactive element - without this it will be
'focusable' when using the keyboard to navigate. #}
<svg
role="presentation"
aria-hidden="true"
focusable="false"
class="govuk-header__logotype-crown"
xmlns="http://www.w3.org/2000/svg"
Expand Down

0 comments on commit 5454153

Please sign in to comment.