Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set title lang to match locale of content #862

Merged
merged 1 commit into from
Apr 6, 2018
Merged

Conversation

MatMoore
Copy link
Contributor

@MatMoore MatMoore commented Apr 3, 2018

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).

I think we should also update the core layout in static and/or govuk_template, to allow for a title lang variable to be passed in, but it doesn't seem to be necessary for formats rendered by government frontend (please correct me if I'm wrong).

Government frontend seems like a sensible place to start because it renders news which accounts for most non english content iirc.


Visual regression results:
https://government-frontend-pr-862.surge.sh/gallery.html

Component guide for this PR:
https://government-frontend-pr-862.herokuapp.com/component-guide

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).
@MatMoore MatMoore merged commit c35e709 into master Apr 6, 2018
@MatMoore MatMoore deleted the set-lang-for-titles branch April 6, 2018 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants