Skip to content

Commit

Permalink
<html lang="en">, closes #2348
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 11, 2024
1 parent 9a3c3bf commit 7437d40
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion datasette/templates/base.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% import "_crumbs.html" as crumbs with context %}<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{{ urls.static('app.css') }}?{{ app_css_hash }}">
Expand Down
2 changes: 1 addition & 1 deletion datasette/templates/patterns.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<title>Datasette: Pattern Portfolio</title>
<link rel="stylesheet" href="{{ base_url }}-/static/app.css?{{ app_css_hash }}">
Expand Down
2 changes: 2 additions & 0 deletions tests/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def test_homepage(app_client_two_attached_databases):
response = app_client_two_attached_databases.get("/")
assert response.status_code == 200
assert "text/html; charset=utf-8" == response.headers["content-type"]
# Should have a html lang="en" attribute
assert '<html lang="en">' in response.text
soup = Soup(response.content, "html.parser")
assert "Datasette Fixtures" == soup.find("h1").text
assert (
Expand Down

0 comments on commit 7437d40

Please sign in to comment.