• Resolved morris373

    (@morris373)


    Hi
    I have to build a website that conforms to the latest Accessibilty Standards so that people who use Screen Readers can read the webpage in their language i.e. English. Welsh etc.

    If I have a page in English and the other in Welsh or whatever language, would I just need to set each page as <html lang="en"> and <html lang="cy">? At the moment each page does show the correct language.

    The Accessibilty Checker Plugin is trying to tell me to use for example <p lang="en"> and <p lang="cy>" for every HTML tag on every page.

    If I had quite a number of pages, then it would take ages adding lang=”cy” to each HTML tag or element to every page i.e. p, h2, h3, ul, li etc.

    Is there a way of adding this automatically to each tag on each translated page automatically?

    Which one is correct?

    Cheers

    Morris

    • This topic was modified 4 years, 3 months ago by morris373.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter morris373

    (@morris373)

    Hi
    Just found out that each page or document just needs the language attribute set as <html lang="en"> or <html lang="your language"> but if there’s mixed languages on the same page then each different language other than the page’s language has to have for example <p lang="cy"> set.

    This looked like a nightmare, especially if every page content in a different language needed doing.

    Morris

    Plugin Author Chouby

    (@chouby)

    Hello,

    I confirm that it is not needed spcify the ‘lang’ attribute on <p> if its value would be the same as the one specified in the <html> tag. It is necessary only when the language differs. That’s why you’ll see this ‘lang’ attribute in the language switcher which displays the language names in a different language than the main one.

    Ideally we would also need to do that in the backend, even on a fresh install as WP allows users to display the interface in a language different from the site’s main language. Unfortunately, this is currently not possible for a plugin to add this feature as WordPress is lacking the necessary filters. A ticket exists for this issue: https://core.trac.www.ads-software.com/ticket/48996

    Thread Starter morris373

    (@morris373)

    Hi Chouby
    Thank you for explaining this issue and showing the support ticket.

    The plugin I am using to check for accessibilty issues is giving me the wrong information in the backend so I should post something on their support page as well.

    If everything has been tested in English or the main language set for that document then really I should ignore any warnings that appear in the translated pages in the backend.

    It’s also telling me on the translated pages that my links are opening in a new tab and I haven’t told the User but it has been set but in the other language which this plugin doesn’t understand.

    Cheers for your help

    Morris

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Accessibility Standards – Add Lang=”” tyo each HTML tag’ is closed to new replies.