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

Translated pages are unpronounceable by assistive tech #2864

Closed
NickColley opened this issue Nov 23, 2016 · 6 comments
Closed

Translated pages are unpronounceable by assistive tech #2864

NickColley opened this issue Nov 23, 2016 · 6 comments

Comments

@NickColley
Copy link
Contributor

NickColley commented Nov 23, 2016

Issue found while visiting the Scottish Government's Device Lab

When testing with VoiceOver on iPad I found that these pages can not be accessed at all.

https://www.gov.uk/government/world/saudi-arabia

https://drive.google.com/file/d/0B-GzTJBVVSNzcnpQa2d6Nk5fVjA/view?usp=sharing

I think this could be solved by making sure we're setting the right lang attribute https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang

I've tested the BBC Arabic site and VoiceOver was able to read that fine.

@robinwhittleton
Copy link
Contributor

Link to the ar version should have lang="ar" and hreflang="ar". The ar page should have <main lang="ar"> with appropriate lang="en" sections.

@rubenarakelyan
Copy link
Contributor

#2895 and alphagov/government-frontend#204 need to be built-upon to add the hreflang attribute.

@robinwhittleton
Copy link
Contributor

I might be wrong about hreflang actually as the whole page is still lang="en", it just has alternate language sections. The lang Attribute is still needed.

@rubenarakelyan
Copy link
Contributor

But if the majority of the content on the page is in another language, is lang="en" still right for the <html> tag, or should we instead be marking up English where it appears?

@robinwhittleton
Copy link
Contributor

Yeah, <html lang="en"> is correct on GOV.UK. In terms of tree structure, the top level content (i.e. header and footer) is in English, and it’s only when you get into the content that you would need to mark that up as lang="xx". HTML language works on the tree rather than majorities.

@tijmenb
Copy link
Contributor

tijmenb commented Mar 12, 2018

Now tracked https://trello.com/c/O3Dqb6HR/40-fix-screen-reading-for-translated-pages, because it's not a Whitehall-specific issue.

@tijmenb tijmenb closed this as completed Mar 12, 2018
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

No branches or pull requests

4 participants