diff --git a/docs/developer/README.md b/docs/developer/README.md index 23d1948b3..9222f07c3 100644 --- a/docs/developer/README.md +++ b/docs/developer/README.md @@ -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 diff --git a/src/docker-compose.yml b/src/docker-compose.yml index bbd6f20d5..ba356d6a9 100644 --- a/src/docker-compose.yml +++ b/src/docker-compose.yml @@ -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: diff --git a/src/registrar/context_processors.py b/src/registrar/context_processors.py index f353b22c4..6e104b66d 100644 --- a/src/registrar/context_processors.py +++ b/src/registrar/context_processors.py @@ -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 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}