Skip to content

Language audit should check text's ancestor for non-English lang attribute value #212

Description

@a11ya11y

The language audit checks the readability of English text content in web pages.

Currently, language_audit.py only checks the lang attribute on the html element to ensure the page is in English. It doesn't confirm that the text it is testing isn't in another language indicated by a lang attribute on one of the text's ancestor elements.

This means, for example, that Māori text in a div with lang="mi" will still be tested for readability if the page has <html lang="en-NZ">, when it should be excluded.

When the language audit is selecting text to test for readability, it should check that the text has not inherited a non-English language declaration from a lang attribute on an ancestor element. If the text being tested is marked up as not being in English, it should be excluded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions