mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-29 15:53:31 +02:00
Address review feedback
This commit is contained in:
parent
4440d2b3b9
commit
aa06a3df20
3 changed files with 11 additions and 2 deletions
|
@ -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
|
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
|
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,
|
`.github/workflows/test.yaml`) but it can also be run locally. To run locally,
|
||||||
just
|
type
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker-compose run pa11y npm run pa11y-ci
|
docker-compose run pa11y npm run pa11y-ci
|
||||||
|
|
|
@ -58,6 +58,8 @@ services:
|
||||||
- SYS_ADMIN
|
- SYS_ADMIN
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
|
# internal Docker volume that will cover up the host's
|
||||||
|
# node_modules directory inside of the container
|
||||||
- /app/node_modules
|
- /app/node_modules
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
links:
|
links:
|
||||||
|
|
|
@ -2,5 +2,12 @@ from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
def language_code(request):
|
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}
|
return {"LANGUAGE_CODE": settings.LANGUAGE_CODE}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue