Skip to content

Commit

Permalink
Set title lang to match locale of content
Browse files Browse the repository at this point in the history
See alphagov/govuk_template#342

Currently we set the html level lang to "en" and add a lang
attribute to the "main" element with the locale of the content.

This causes screen readers to interpret the page title in
english. We should instead markup the title with the same
langugage (both the title and main content are in the
content item's language).
  • Loading branch information
MatMoore committed Apr 3, 2018
1 parent 4c2e4a2 commit fa76ae6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>
<title lang="<%= I18n.locale %>">
<%if content_for?(:title) %>
<%= yield :title %> - GOV.UK
<% else %>
Expand Down

0 comments on commit fa76ae6

Please sign in to comment.