Giter Site home page Giter Site logo

Comments (6)

robinwhittleton avatar robinwhittleton commented on June 12, 2024

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.

from whitehall.

rubenarakelyan avatar rubenarakelyan commented on June 12, 2024

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

from whitehall.

robinwhittleton avatar robinwhittleton commented on June 12, 2024

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.

from whitehall.

rubenarakelyan avatar rubenarakelyan commented on June 12, 2024

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?

from whitehall.

robinwhittleton avatar robinwhittleton commented on June 12, 2024

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.

from whitehall.

tijmenb avatar tijmenb commented on June 12, 2024

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

from whitehall.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.