Skip to content

Language attribute of <html> element should not be set to English by default #599

@botic

Description

@botic

The current HTML template explictly sets the language attribute to English with lang="en". This turned out to be a bad pattern if your project is not solely targeting the English-speaking communities. Google Chrome might auto-translate such pages, even if the actual language of the text is in German.

See more details here: vuejs/vue-cli#5945

If not changed, Vite-powered Vue projects will see a high number of false language attributes in the wild!

Code search returned two places with explicit language attribute:

Expected behavior

The language attribute on the element of the template should be absent or empty. This will let the user agent decide (e.g. autodetect) the language of the page.

You can find the vue-cli solution here: vuejs/vue-cli@2373df1

How to reproduce

Just create a new project :-)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions