Address review feedback

This commit is contained in:
Neil Martinsen-Burrell 2022-09-14 14:19:35 -05:00
parent 4440d2b3b9
commit aa06a3df20
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
3 changed files with 11 additions and 2 deletions

View file

@ -67,7 +67,7 @@ docker-compose exec app ./manage.py lint
The tool `pa11y-ci` is used to scan pages for compliance with a set of
accessibility rules. The scan runs as part of our CI setup (see
`.github/workflows/test.yaml`) but it can also be run locally. To run locally,
just
type
```shell
docker-compose run pa11y npm run pa11y-ci

View file

@ -58,6 +58,8 @@ services:
- SYS_ADMIN
volumes:
- .:/app
# internal Docker volume that will cover up the host's
# node_modules directory inside of the container
- /app/node_modules
working_dir: /app
links:

View file

@ -2,5 +2,12 @@ from django.conf import settings
def language_code(request):
"""Add LANGUAGE_CODE to the template context."""
"""Add LANGUAGE_CODE to the template context.
The <html> element of a web page should include a lang="..." attribute. In
Django, the correct thing to put in that attribute is the value of
settings.LANGUAGE_CODE but the template context can't access that value
unless we add it here (and configure this context processor in the
TEMPLATES dict of our settings file).
"""
return {"LANGUAGE_CODE": settings.LANGUAGE_CODE}