Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add lang attribute to html tag #146

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

jpmckinney
Copy link
Contributor

@jpmckinney jpmckinney commented Oct 4, 2024

WCAG Success Criterion 3.1.1 requires that a page language is specified in a way which may be 'programmatically determined' (i.e. via the lang attribute).

https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang#accessibility_concerns

@odscjames odscjames merged commit e590fa4 into OpenDataServices:main Oct 8, 2024
10 checks passed
@odscjames
Copy link
Collaborator

Thank you!

@@ -2,7 +2,8 @@
{% load static %}
{% load bootstrap3 %}
{% load i18n %}
<html>
{% get_current_language as LANGUAGE_CODE %}
<html lang="{{ LANGUAGE_CODE }}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like LANGUAGE_CODE is also defined later on in this template, do we need to remove that deceleration as it's now in the outter scope to avoid any possible shadowing issue in the future?

{% get_current_language as LANGUAGE_CODE %}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants