Skip to content

Commit

Permalink
Add a space to homepage heading h1
Browse files Browse the repository at this point in the history
We recently swapped the punctuation in the new visually hidden text in the homepage heading from a colon to a dash, but didn't include a space in front of the dash. This wasn't obvious visually or when tested with screen readers since the visually hidden text inserts a space chacter before it. However if the user turns off their stylesheets, there wouldn't be a space character before the dash.
  • Loading branch information
hannalaakso committed Nov 2, 2023
1 parent 49c01fd commit 3a4f212
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/views/homepage/_homepage_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<h1 class="homepage-header__title" data-ga4-scroll-marker>
<%# The indentation of the spans below reflects the copy. Ticket to investigate a programmatic solution: https://trello.com/c/kroI3kLZ/684-stop-extra-whitespace-being-added-inside-homepage-h1
%>
<span class="govuk-!-margin-bottom-2 govuk-!-display-block"><%=t('homepage.index.intro_title.short_text')%></span><span class="govuk-visually-hidden">- </span>
<span class="homepage-header__intro homepage-inverse-header__intro--bold">
<%= t('homepage.index.intro_html') %></span>
<span class="govuk-!-margin-bottom-2 govuk-!-display-block"><%=t('homepage.index.intro_title.short_text')%></span>
<span class="govuk-visually-hidden">-</span>
<span class="homepage-header__intro homepage-inverse-header__intro--bold"><%= t('homepage.index.intro_html') %></span>
</h1>
</div>
<div class="govuk-grid-row">
Expand Down

0 comments on commit 3a4f212

Please sign in to comment.