From 39f8c3e525536449b56c9a93f437bf35046ab0c0 Mon Sep 17 00:00:00 2001
From: StephDriver <5330770+StephDriver@users.noreply.github.com>
Date: Mon, 20 Jul 2026 10:51:52 +0100
Subject: [PATCH 1/4] a11y: #5397 add repository support to accessibility view
---
src/journal/views.py | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/journal/views.py b/src/journal/views.py
index 9b3f04655b..7e9e8d592e 100755
--- a/src/journal/views.py
+++ b/src/journal/views.py
@@ -2124,6 +2124,8 @@ def accessibility(request):
template = "admin/core/a11y.html"
elif request.journal:
template = "core/a11y.html"
+ elif request.repository:
+ template = "repository/a11y.html"
else:
template = "press/a11y.html"
@@ -2165,10 +2167,12 @@ def parse_audit_link(audit_str):
except (FileNotFoundError, json.JSONDecodeError):
vpat_data = {}
- # For press a11y page, identify themes in use by journals
+ # For press a11y page, identify themes in use by journals and repositories
journal_themes = {}
- if not request.journal: # This is the press-level page
+ repository_themes = {}
+ if not request.journal and not request.repository: # This is the press-level page
from core.models import SettingValue, Setting
+ from repository.models import Repository
press = request.press
all_journals = press.journals()
@@ -2193,9 +2197,19 @@ def parse_audit_link(audit_str):
theme_lower = theme.lower()
journal_themes[theme_lower] = {"has_vpat": theme_lower in vpat_data}
+ # Check all themes used by repositories belonging to this press
+ repository_themes_in_use = set(
+ Repository.objects.filter(press=press).values_list("theme", flat=True)
+ )
+ for theme in repository_themes_in_use:
+ theme_lower = theme.lower()
+ repository_themes[theme_lower] = {"has_vpat": theme_lower in vpat_data}
+
context = {
"vpat_data": vpat_data,
"journal_themes": journal_themes,
+ "repository_themes": repository_themes,
+ "other_themes_in_use": set(journal_themes) | set(repository_themes),
}
return render(request, template, context)
From 27311e8097a042f4eab32d16872fe2643bd214ce Mon Sep 17 00:00:00 2001
From: StephDriver <5330770+StephDriver@users.noreply.github.com>
Date: Mon, 20 Jul 2026 12:21:00 +0100
Subject: [PATCH 2/4] a11y: #5397 show repository VPATs on a11y page
---
src/themes/OLH/templates/press/a11y.html | 22 ++++++++++++-----
src/themes/OLH/templates/repository/a11y.html | 20 ++++++++++++++++
src/themes/clean/templates/press/a11y.html | 24 ++++++++++++++-----
src/themes/material/templates/press/a11y.html | 20 ++++++++++++----
.../material/templates/repository/a11y.html | 15 ++++++++++++
5 files changed, 84 insertions(+), 17 deletions(-)
create mode 100644 src/themes/OLH/templates/repository/a11y.html
create mode 100644 src/themes/material/templates/repository/a11y.html
diff --git a/src/themes/OLH/templates/press/a11y.html b/src/themes/OLH/templates/press/a11y.html
index 046ea6a562..e3a8fe29c8 100644
--- a/src/themes/OLH/templates/press/a11y.html
+++ b/src/themes/OLH/templates/press/a11y.html
@@ -12,27 +12,37 @@
{% trans "Accessibility" %}
{% include "common/elements/a11y/press.html" %}
{% include "common/elements/a11y/janeway.html" %}
- {% if not journal_themes or journal_themes|length == 1 and 'olh' in journal_themes %}
+ {% if not other_themes_in_use or other_themes_in_use|length == 1 and 'olh' in other_themes_in_use %}
VPAT
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="olh" %}
{% else %}
{% blocktrans %}
Janeway has several themes, each of which has unique templates and is built on a different framework and so vary in accessibility.
- This press-site uses a different theme to some of the journals-sites. VPATs for all themes in use are given below.
+ This press-site uses a different theme to some of the journal- or repository-sites it hosts. VPATs for all themes in use are given below.
{% endblocktrans%}
- {% if 'olh' in journal_themes %}
+ {% if 'olh' in journal_themes and 'olh' in repository_themes %}
+ {% trans "OLH Theme VPAT (Press, Journals and Repositories)" %}
+ {% elif 'olh' in journal_themes %}
{% trans "OLH Theme VPAT (Press and Journals)" %}
+ {% elif 'olh' in repository_themes %}
+ {% trans "OLH Theme VPAT (Press and Repositories)" %}
{% else %}
{% trans "OLH Theme VPAT (Press)" %}
{% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="olh" %}
- {% if 'material' in journal_themes %}
- {% trans "Material Theme VPAT (Journals)" %}
- {% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
+ {% if 'material' in journal_themes or 'material' in repository_themes %}
+ {% if 'material' in journal_themes and 'material' in repository_themes %}
+ {% trans "Material Theme VPAT (Journals and Repositories)" %}
+ {% elif 'material' in journal_themes %}
+ {% trans "Material Theme VPAT (Journals)" %}
+ {% else %}
+ {% trans "Material Theme VPAT (Repositories)" %}
+ {% endif %}
+ {% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
{% endif %}
{% if 'clean' in journal_themes %}
diff --git a/src/themes/OLH/templates/repository/a11y.html b/src/themes/OLH/templates/repository/a11y.html
new file mode 100644
index 0000000000..5b063a6a7e
--- /dev/null
+++ b/src/themes/OLH/templates/repository/a11y.html
@@ -0,0 +1,20 @@
+{% extends "core/base.html" %}
+
+{% block title %}{% trans "Accessibility" %}{% endblock %}
+
+{% block body %}
+
+
+
+
+
{% trans "Accessibility" %}
+
+ {% include "common/elements/a11y/press.html" %}
+ {% include "common/elements/a11y/janeway.html" %}
+ {% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="olh" %}
+
+
+
+
+
+{% endblock body %}
diff --git a/src/themes/clean/templates/press/a11y.html b/src/themes/clean/templates/press/a11y.html
index 02ec8cf7a8..561a7214ed 100644
--- a/src/themes/clean/templates/press/a11y.html
+++ b/src/themes/clean/templates/press/a11y.html
@@ -10,14 +10,14 @@ {% trans "Accessibility" %}
{% include "common/elements/a11y/press.html" %}
{% include "common/elements/a11y/janeway.html" %}
- {% if not journal_themes or journal_themes|length == 1 and 'clean' in journal_themes %}
+ {% if not other_themes_in_use or other_themes_in_use|length == 1 and 'clean' in other_themes_in_use %}
VPAT
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="clean" %}
{% else %}
{% blocktrans %}
Janeway has several themes, each of which has unique templates and is built on a different framework and so vary in accessibility.
- This press-site uses a different theme to some of the journals-sites. VPATs for all themes in use are given below.
+ This press-site uses a different theme to some of the journal- or repository-sites it hosts. VPATs for all themes in use are given below.
{% endblocktrans%}
@@ -28,13 +28,25 @@ {% trans "Clean Theme VPAT (Press)" %}
{% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="clean" %}
- {% if 'olh' in journal_themes %}
- {% trans "OLH Theme VPAT (Journals)" %}
+ {% if 'olh' in journal_themes or 'olh' in repository_themes %}
+ {% if 'olh' in journal_themes and 'olh' in repository_themes %}
+ {% trans "OLH Theme VPAT (Journals and Repositories)" %}
+ {% elif 'olh' in journal_themes %}
+ {% trans "OLH Theme VPAT (Journals)" %}
+ {% else %}
+ {% trans "OLH Theme VPAT (Repositories)" %}
+ {% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="olh" %}
{% endif %}
- {% if 'material' in journal_themes %}
- {% trans "Material Theme VPAT (Journals)" %}
+ {% if 'material' in journal_themes or 'material' in repository_themes %}
+ {% if 'material' in journal_themes and 'material' in repository_themes %}
+ {% trans "Material Theme VPAT (Journals and Repositories)" %}
+ {% elif 'material' in journal_themes %}
+ {% trans "Material Theme VPAT (Journals)" %}
+ {% else %}
+ {% trans "Material Theme VPAT (Repositories)" %}
+ {% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
{% endif %}
diff --git a/src/themes/material/templates/press/a11y.html b/src/themes/material/templates/press/a11y.html
index 82f5ca5bd9..2ec2b33d52 100644
--- a/src/themes/material/templates/press/a11y.html
+++ b/src/themes/material/templates/press/a11y.html
@@ -11,26 +11,36 @@ {% trans "Accessibility" %}
{% include "common/elements/a11y/press.html" %}
{% include "common/elements/a11y/janeway.html" %}
- {% if not journal_themes or journal_themes|length == 1 and 'material' in journal_themes %}
+ {% if not other_themes_in_use or other_themes_in_use|length == 1 and 'material' in other_themes_in_use %}
VPAT
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
{% else %}
{% blocktrans %}
Janeway has several themes, each of which has unique templates and is built on a different framework and so vary in accessibility.
- This press-site uses a different theme to some of the journals-sites. VPATs for all themes in use are given below.
+ This press-site uses a different theme to some of the journal- or repository-sites it hosts. VPATs for all themes in use are given below.
{% endblocktrans%}
- {% if 'material' in journal_themes %}
+ {% if 'material' in journal_themes and 'material' in repository_themes %}
+ {% trans "Material Theme VPAT (Press, Journals and Repositories)" %}
+ {% elif 'material' in journal_themes %}
{% trans "Material Theme VPAT (Press and Journals)" %}
+ {% elif 'material' in repository_themes %}
+ {% trans "Material Theme VPAT (Press and Repositories)" %}
{% else %}
{% trans "Material Theme VPAT (Press)" %}
{% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
- {% if 'olh' in journal_themes %}
- {% trans "OLH Theme VPAT (Journals)" %}
+ {% if 'olh' in journal_themes or 'olh' in repository_themes %}
+ {% if 'olh' in journal_themes and 'olh' in repository_themes %}
+ {% trans "OLH Theme VPAT (Journals and Repositories)" %}
+ {% elif 'olh' in journal_themes %}
+ {% trans "OLH Theme VPAT (Journals)" %}
+ {% else %}
+ {% trans "OLH Theme VPAT (Repositories)" %}
+ {% endif %}
{% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="olh" %}
{% endif %}
diff --git a/src/themes/material/templates/repository/a11y.html b/src/themes/material/templates/repository/a11y.html
new file mode 100644
index 0000000000..1742f8fcc5
--- /dev/null
+++ b/src/themes/material/templates/repository/a11y.html
@@ -0,0 +1,15 @@
+{% extends "core/base.html" %}
+
+{% load static %}
+{% load i18n %}
+{% load materializecss %}
+
+{% block title %}{% trans "Accessibility" %}{% endblock %}
+
+{% block body %}
+ {% trans "Accessibility" %}
+ {% include "common/elements/a11y/press.html" %}
+ {% include "common/elements/a11y/janeway.html" %}
+ {% include "common/elements/a11y/vpat.html" with vpat_data=vpat_data theme="material" %}
+
+{% endblock body %}
\ No newline at end of file
From b777a3f197544a20f9b8b801f220a593310b7388 Mon Sep 17 00:00:00 2001
From: StephDriver <5330770+StephDriver@users.noreply.github.com>
Date: Mon, 20 Jul 2026 12:21:19 +0100
Subject: [PATCH 3/4] a11y: #5397 add accessibility footer link for material
repos
---
src/themes/material/templates/core/base.html | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/themes/material/templates/core/base.html b/src/themes/material/templates/core/base.html
index 83c0eed459..0b7582020f 100644
--- a/src/themes/material/templates/core/base.html
+++ b/src/themes/material/templates/core/base.html
@@ -69,6 +69,9 @@
{% include "elements/journal_footer.html" %}
{% elif request.repository %}
{{ request.repository.footer|safe }}
+
{% else %}
{% include "press/elements/press_footer.html" %}
{% endif %}
From 07dcc6f1d127f388e51f2537502e6df384542b8a Mon Sep 17 00:00:00 2001
From: Andy Byers
Date: Thu, 23 Jul 2026 12:18:59 +0100
Subject: [PATCH 4/4] fix: only count live repositories on the press a11y page
---
src/journal/views.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/journal/views.py b/src/journal/views.py
index 7e9e8d592e..19ef3cc087 100755
--- a/src/journal/views.py
+++ b/src/journal/views.py
@@ -2197,9 +2197,11 @@ def parse_audit_link(audit_str):
theme_lower = theme.lower()
journal_themes[theme_lower] = {"has_vpat": theme_lower in vpat_data}
- # Check all themes used by repositories belonging to this press
+ # Check all themes used by live repositories belonging to this press
repository_themes_in_use = set(
- Repository.objects.filter(press=press).values_list("theme", flat=True)
+ Repository.objects.filter(press=press, live=True).values_list(
+ "theme", flat=True
+ )
)
for theme in repository_themes_in_use:
theme_lower = theme.lower()