simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.06k stars 648 forks source link

Accessibility: add a `lang` attribute to `html` #2348

Closed CharlesNepote closed 2 weeks ago

CharlesNepote commented 1 month ago

When analyzing datasette accessibility, one of the main (and easy to fix?) issue is the lack of lang attribute into thehtml tag: see https://qualweb.di.fc.ul.pt/evaluator/https%253A%252F%252Fglobal-power-plants.datasettes.com%252Fglobal-power-plants%252Fglobal-power-plants

The norm: https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/

Do we only have to fix: https://github.com/simonw/datasette/blob/main/datasette/templates/base.html ?

Is it ok to hard code this since datasette is only in English for the moment: <html lang="en">?

simonw commented 2 weeks ago

Yeah, I think adding lang="en" is fine for the moment. When Datasette gets UI translations into other languages we can revisit.