From e3c079f1beb92a518d2462e93b3034d2e82da330 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:08:46 +0100 Subject: [PATCH 01/17] a11y: #4694 a11y-info create templates --- src/templates/common/elements/a11y/janeway.html | 2 ++ src/templates/common/elements/a11y/journal.html | 2 ++ src/templates/common/elements/a11y/press.html | 2 ++ src/themes/OLH/templates/core/a11y.html | 2 ++ src/themes/clean/templates/core/a11y.html | 2 ++ src/themes/material/templates/core/a11y.html | 2 ++ 6 files changed, 12 insertions(+) create mode 100644 src/templates/common/elements/a11y/janeway.html create mode 100644 src/templates/common/elements/a11y/journal.html create mode 100644 src/templates/common/elements/a11y/press.html create mode 100644 src/themes/OLH/templates/core/a11y.html create mode 100644 src/themes/clean/templates/core/a11y.html create mode 100644 src/themes/material/templates/core/a11y.html diff --git a/src/templates/common/elements/a11y/janeway.html b/src/templates/common/elements/a11y/janeway.html new file mode 100644 index 0000000000..3949b75622 --- /dev/null +++ b/src/templates/common/elements/a11y/janeway.html @@ -0,0 +1,2 @@ +

Janeway A11y Placeholder

+

janeway a11y text

\ No newline at end of file diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html new file mode 100644 index 0000000000..27fd3ade6b --- /dev/null +++ b/src/templates/common/elements/a11y/journal.html @@ -0,0 +1,2 @@ +

Journal A11y Placeholder

+

journal specific a11y text

\ No newline at end of file diff --git a/src/templates/common/elements/a11y/press.html b/src/templates/common/elements/a11y/press.html new file mode 100644 index 0000000000..26608715c3 --- /dev/null +++ b/src/templates/common/elements/a11y/press.html @@ -0,0 +1,2 @@ +

Press A11y Placeholder

+

press a11y text as default for journals and repositories

\ No newline at end of file diff --git a/src/themes/OLH/templates/core/a11y.html b/src/themes/OLH/templates/core/a11y.html new file mode 100644 index 0000000000..c6ca5fc00a --- /dev/null +++ b/src/themes/OLH/templates/core/a11y.html @@ -0,0 +1,2 @@ +

Accessibility

+

OLH Accessibility page placeholder

\ No newline at end of file diff --git a/src/themes/clean/templates/core/a11y.html b/src/themes/clean/templates/core/a11y.html new file mode 100644 index 0000000000..fdf2805d74 --- /dev/null +++ b/src/themes/clean/templates/core/a11y.html @@ -0,0 +1,2 @@ +

Accessibility

+

Clean Accessibility page placeholder

\ No newline at end of file diff --git a/src/themes/material/templates/core/a11y.html b/src/themes/material/templates/core/a11y.html new file mode 100644 index 0000000000..1e6d2fbd81 --- /dev/null +++ b/src/themes/material/templates/core/a11y.html @@ -0,0 +1,2 @@ +

Accessibility

+

Material Accessibility page placeholder

\ No newline at end of file From 6c1a227ae42db35add8dde34dcb9d4fa98a82363 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 11:48:35 +0100 Subject: [PATCH 02/17] a11y: #4694 a11y-info link footers to a11y pages --- src/journal/urls.py | 2 ++ src/journal/views.py | 18 ++++++++++++++++++ .../OLH/templates/elements/journal_footer.html | 1 + src/themes/OLH/templates/press/a11y.html | 2 ++ .../templates/press/elements/press_footer.html | 1 + .../templates/elements/journal_footer.html | 1 + .../clean/templates/elements/press_footer.html | 1 + src/themes/clean/templates/press/a11y.html | 2 ++ .../templates/elements/journal_footer.html | 1 + src/themes/material/templates/press/a11y.html | 2 ++ .../templates/press/elements/press_footer.html | 7 ++++++- 11 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/themes/OLH/templates/press/a11y.html create mode 100644 src/themes/clean/templates/press/a11y.html create mode 100644 src/themes/material/templates/press/a11y.html diff --git a/src/journal/urls.py b/src/journal/urls.py index cb79361678..5f9cf56ba1 100755 --- a/src/journal/urls.py +++ b/src/journal/urls.py @@ -287,6 +287,8 @@ re_path(r"^reviewer/$", views.become_reviewer, name="become_reviewer"), # Contact re_path(r"^contact/$", views.contact, name="contact"), + # Accessibility + re_path(r"^accessibility/$", views.accessibility, name="accessibility"), # Editorial team re_path(r"^editorialteam/$", views.editorial_team, name="editorial_team"), # Editorial team diff --git a/src/journal/views.py b/src/journal/views.py index 32109a44e9..fd594d6247 100755 --- a/src/journal/views.py +++ b/src/journal/views.py @@ -2121,6 +2121,24 @@ def contact(request): return render(request, template, context) +@decorators.frontend_enabled +def accessibility(request): + """ + Displays the accessibility information page. + :param request: HttpRequest object + :return: HttpResponse object + """ + if request.journal and request.journal.disable_front_end: + template = "admin/core/a11y.html" + elif request.journal: + template = "core/a11y.html" + else: + template = "press/a11y.html" + + context = {} + return render(request, template, context) + + @decorators.frontend_enabled def editorial_team(request, group_id=None): """ diff --git a/src/themes/OLH/templates/elements/journal_footer.html b/src/themes/OLH/templates/elements/journal_footer.html index 38b65fc38b..75af2ae946 100644 --- a/src/themes/OLH/templates/elements/journal_footer.html +++ b/src/themes/OLH/templates/elements/journal_footer.html @@ -41,6 +41,7 @@
  • {% trans "Privacy Policy" %}
  • {% endif %}
  • {% trans "Contact" %}
  • +
  • {% trans "Accessibility" %}
  • {% if not request.user.is_authenticated %}
  • diff --git a/src/themes/OLH/templates/press/a11y.html b/src/themes/OLH/templates/press/a11y.html new file mode 100644 index 0000000000..c8a73856e1 --- /dev/null +++ b/src/themes/OLH/templates/press/a11y.html @@ -0,0 +1,2 @@ +

    Accessibility

    +

    OLH Press Accessibility page placeholder

    \ No newline at end of file diff --git a/src/themes/OLH/templates/press/elements/press_footer.html b/src/themes/OLH/templates/press/elements/press_footer.html index e6e9480803..0b056ab3f4 100644 --- a/src/themes/OLH/templates/press/elements/press_footer.html +++ b/src/themes/OLH/templates/press/elements/press_footer.html @@ -14,6 +14,7 @@ {% endif %}
  • {% trans "Sitemap" %}
  • {% trans "Contact" %}
  • +
  • {% trans "Accessibility" %}
  • {% if not request.user.is_authenticated %}
  • diff --git a/src/themes/clean/templates/elements/journal_footer.html b/src/themes/clean/templates/elements/journal_footer.html index 16747f0531..9ba7991304 100644 --- a/src/themes/clean/templates/elements/journal_footer.html +++ b/src/themes/clean/templates/elements/journal_footer.html @@ -51,6 +51,7 @@
  • {% trans "Privacy Policy" %}
  • {% endif %} +
  • {% trans "Accessibility" %}
  • {% trans "Contact" %}
  • {% if not request.user.is_authenticated %}
  • diff --git a/src/themes/clean/templates/elements/press_footer.html b/src/themes/clean/templates/elements/press_footer.html index d6edeb9445..bad8362925 100644 --- a/src/themes/clean/templates/elements/press_footer.html +++ b/src/themes/clean/templates/elements/press_footer.html @@ -17,6 +17,7 @@ {% endif %}
  • {% trans "Sitemap" %}
  • {% trans "Contact" %}
  • +
  • {% trans "Accessibility" %}
  • {% if not request.user.is_authenticated %}
  • diff --git a/src/themes/clean/templates/press/a11y.html b/src/themes/clean/templates/press/a11y.html new file mode 100644 index 0000000000..82b02b7a14 --- /dev/null +++ b/src/themes/clean/templates/press/a11y.html @@ -0,0 +1,2 @@ +

    Accessibility

    +

    Clean Press Accessibility page placeholder

    \ No newline at end of file diff --git a/src/themes/material/templates/elements/journal_footer.html b/src/themes/material/templates/elements/journal_footer.html index 8d47d55781..47e0752fb3 100644 --- a/src/themes/material/templates/elements/journal_footer.html +++ b/src/themes/material/templates/elements/journal_footer.html @@ -38,6 +38,7 @@ {% endif %}> {% trans "Privacy Policy" %}
  • +
  • {% trans "Accessibility" %}
  • diff --git a/src/themes/material/templates/press/a11y.html b/src/themes/material/templates/press/a11y.html new file mode 100644 index 0000000000..e469a5be65 --- /dev/null +++ b/src/themes/material/templates/press/a11y.html @@ -0,0 +1,2 @@ +

    Accessibility

    +

    Material Press Accessibility page placeholder

    \ No newline at end of file diff --git a/src/themes/material/templates/press/elements/press_footer.html b/src/themes/material/templates/press/elements/press_footer.html index 4797bc5247..ca33b26030 100644 --- a/src/themes/material/templates/press/elements/press_footer.html +++ b/src/themes/material/templates/press/elements/press_footer.html @@ -3,7 +3,12 @@
    {% svg request.press_cover %}
    -
    +

    {{ press.footer_description|default:""|safe }}

    +
    From ac38db3cdb292aff6d95b642938db4319620cb18 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 12:09:07 +0100 Subject: [PATCH 03/17] a11y: #4694 a11y-info theme pages include common a11y templates --- src/themes/OLH/templates/core/a11y.html | 17 +++++++++++++++-- src/themes/OLH/templates/press/a11y.html | 15 +++++++++++++-- src/themes/clean/templates/core/a11y.html | 17 +++++++++++++++-- src/themes/clean/templates/press/a11y.html | 16 ++++++++++++++-- src/themes/material/templates/core/a11y.html | 18 ++++++++++++++++-- src/themes/material/templates/press/a11y.html | 17 +++++++++++++++-- 6 files changed, 88 insertions(+), 12 deletions(-) diff --git a/src/themes/OLH/templates/core/a11y.html b/src/themes/OLH/templates/core/a11y.html index c6ca5fc00a..6aebfce268 100644 --- a/src/themes/OLH/templates/core/a11y.html +++ b/src/themes/OLH/templates/core/a11y.html @@ -1,2 +1,15 @@ -

    Accessibility

    -

    OLH Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + +{% include "common/elements/a11y/janeway.html" %} +{% include "common/elements/a11y/press.html" %} +{% include "common/elements/a11y/journal.html" %} + +{% endblock body %} \ No newline at end of file diff --git a/src/themes/OLH/templates/press/a11y.html b/src/themes/OLH/templates/press/a11y.html index c8a73856e1..efe3741241 100644 --- a/src/themes/OLH/templates/press/a11y.html +++ b/src/themes/OLH/templates/press/a11y.html @@ -1,2 +1,13 @@ -

    Accessibility

    -

    OLH Press Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + {% include "common/elements/a11y/janeway.html" %} + {% include "common/elements/a11y/press.html" %} + +{% endblock body %} \ No newline at end of file diff --git a/src/themes/clean/templates/core/a11y.html b/src/themes/clean/templates/core/a11y.html index fdf2805d74..6aebfce268 100644 --- a/src/themes/clean/templates/core/a11y.html +++ b/src/themes/clean/templates/core/a11y.html @@ -1,2 +1,15 @@ -

    Accessibility

    -

    Clean Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + +{% include "common/elements/a11y/janeway.html" %} +{% include "common/elements/a11y/press.html" %} +{% include "common/elements/a11y/journal.html" %} + +{% endblock body %} \ No newline at end of file diff --git a/src/themes/clean/templates/press/a11y.html b/src/themes/clean/templates/press/a11y.html index 82b02b7a14..6a4f605496 100644 --- a/src/themes/clean/templates/press/a11y.html +++ b/src/themes/clean/templates/press/a11y.html @@ -1,2 +1,14 @@ -

    Accessibility

    -

    Clean Press Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + +{% include "common/elements/a11y/janeway.html" %} +{% include "common/elements/a11y/press.html" %} + +{% endblock body %} \ No newline at end of file diff --git a/src/themes/material/templates/core/a11y.html b/src/themes/material/templates/core/a11y.html index 1e6d2fbd81..f45e506545 100644 --- a/src/themes/material/templates/core/a11y.html +++ b/src/themes/material/templates/core/a11y.html @@ -1,2 +1,16 @@ -

    Accessibility

    -

    Material Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} +{% load materializecss %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + +{% include "common/elements/a11y/janeway.html" %} +{% include "common/elements/a11y/press.html" %} +{% include "common/elements/a11y/journal.html" %} + +{% endblock body %} \ No newline at end of file diff --git a/src/themes/material/templates/press/a11y.html b/src/themes/material/templates/press/a11y.html index e469a5be65..42d9dcdf30 100644 --- a/src/themes/material/templates/press/a11y.html +++ b/src/themes/material/templates/press/a11y.html @@ -1,2 +1,15 @@ -

    Accessibility

    -

    Material Press Accessibility page placeholder

    \ No newline at end of file +{% extends "core/base.html" %} + +{% load static %} +{% load i18n %} +{% load materializecss %} + +{% block title %}{% trans "Accessibility" %}{% endblock %} + +{% block body %} +

    {% trans "Accessibility" %}

    + +{% include "common/elements/a11y/janeway.html" %} +{% include "common/elements/a11y/press.html" %} + +{% endblock body %} \ No newline at end of file From 48019c7690bfe88e285ee419d73b0fc6048cefad Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:32:32 +0100 Subject: [PATCH 04/17] a11y: #4694 a11y-info press settings --- src/press/forms.py | 3 ++ ...allow_journal_ally_info_press_ally_info.py | 32 +++++++++++++++++++ src/press/models.py | 11 +++++++ src/templates/admin/press/edit_press.html | 5 +++ src/templates/common/elements/a11y/press.html | 6 ++-- 5 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py diff --git a/src/press/forms.py b/src/press/forms.py index 10e321cf42..11585f4050 100755 --- a/src/press/forms.py +++ b/src/press/forms.py @@ -41,12 +41,15 @@ class Meta: "tracking_code", "disable_journals", "privacy_policy_url", + "ally_info", + "allow_journal_ally_info", ) widgets = { "theme": forms.Select(choices=logic.get_theme_list()), "footer_description": TinyMCE(), "journal_footer_text": TinyMCE(), "description": TinyMCE(), + "ally_info": TinyMCE(), } def save(self, commit=True): diff --git a/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py b/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py new file mode 100644 index 0000000000..70cb141caa --- /dev/null +++ b/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py @@ -0,0 +1,32 @@ +# Generated by Django 4.2.20 on 2025-09-08 14:31 + +import core.model_utils +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("press", "0036_remove_press_password_reset_text_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="press", + name="allow_journal_ally_info", + field=models.BooleanField( + default=False, + help_text="If enabled, journals can have their own accessibility information as well.", + verbose_name="Allow Journal Accessibility Information", + ), + ), + migrations.AddField( + model_name="press", + name="ally_info", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", + null=True, + verbose_name="Press Accessibility Information", + ), + ), + ] diff --git a/src/press/models.py b/src/press/models.py index e19c3649f3..ba9dcf2e69 100755 --- a/src/press/models.py +++ b/src/press/models.py @@ -184,6 +184,17 @@ class Press(AbstractSiteModel): disable_journals = models.BooleanField( default=False, help_text="If enabled, the journals page will no longer render." ) + ally_info = JanewayBleachField( + blank=True, + null=True, + verbose_name="Press Accessibility Information", + help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", + ) + allow_journal_ally_info = models.BooleanField( + default=False, + verbose_name="Allow Journal Accessibility Information", + help_text="If enabled, journals can have their own accessibility information as well.", + ) def __str__(self): return "%s" % self.name diff --git a/src/templates/admin/press/edit_press.html b/src/templates/admin/press/edit_press.html index 5ab5dda3a4..96066e5d3e 100644 --- a/src/templates/admin/press/edit_press.html +++ b/src/templates/admin/press/edit_press.html @@ -57,6 +57,11 @@

    Security

    {{ form.password_length|foundation }} {{ form.privacy_policy_url|foundation }} {{ form.tracking_code|foundation }} +
    +

    Accessibility

    +
    + {{ form.ally_info|foundation }} + {{ form.allow_journal_ally_info|foundation }}
    diff --git a/src/templates/common/elements/a11y/press.html b/src/templates/common/elements/a11y/press.html index 26608715c3..2ffac29de1 100644 --- a/src/templates/common/elements/a11y/press.html +++ b/src/templates/common/elements/a11y/press.html @@ -1,2 +1,4 @@ -

    Press A11y Placeholder

    -

    press a11y text as default for journals and repositories

    \ No newline at end of file +{% if press.ally_info%} +

    {{ press.name }}

    + {{ press.ally_info|safe }} +{% endif %} \ No newline at end of file From e60d1caf5f4e2429f7aa301d67a3a4b17513f433 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:34:21 +0100 Subject: [PATCH 05/17] a11y: #4694 a11y-info journal settings --- src/core/forms/forms.py | 2 ++ .../0069_journal_journal_a11y_info.py | 23 +++++++++++++++++++ src/journal/models.py | 6 +++++ .../admin/elements/forms/group_journal.html | 8 +++++++ .../common/elements/a11y/journal.html | 6 +++-- 5 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 src/journal/migrations/0069_journal_journal_a11y_info.py diff --git a/src/core/forms/forms.py b/src/core/forms/forms.py index d64e964525..d944619e83 100755 --- a/src/core/forms/forms.py +++ b/src/core/forms/forms.py @@ -491,6 +491,7 @@ class Meta: model = journal_models.Journal fields = ( "contact_info", + "journal_a11y_info", "is_remote", "remote_view_url", "remote_submit_url", @@ -543,6 +544,7 @@ class Meta: model = journal_models.Journal fields = ( "contact_info", + "journal_a11y_info", "header_image", "default_cover_image", "default_large_image", diff --git a/src/journal/migrations/0069_journal_journal_a11y_info.py b/src/journal/migrations/0069_journal_journal_a11y_info.py new file mode 100644 index 0000000000..f993f81c6e --- /dev/null +++ b/src/journal/migrations/0069_journal_journal_a11y_info.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.20 on 2025-09-08 14:51 + +import core.model_utils +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("journal", "0068_issue_cached_display_title_a11y_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="journal", + name="journal_a11y_info", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", + null=True, + verbose_name="Journal Accessibility Information", + ), + ), + ] diff --git a/src/journal/models.py b/src/journal/models.py index b441b05cfe..1b9539ef01 100644 --- a/src/journal/models.py +++ b/src/journal/models.py @@ -197,6 +197,12 @@ class Journal(AbstractSiteModel): contact_info = JanewayBleachField( null=True, blank=True, verbose_name="Contact Information" ) + journal_a11y_info = JanewayBleachField( + null=True, + blank=True, + verbose_name="Journal Accessibility Information", + help_text="This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", + ) keywords = models.ManyToManyField( "submission.Keyword", blank=True, diff --git a/src/templates/admin/elements/forms/group_journal.html b/src/templates/admin/elements/forms/group_journal.html index ff59b01c0d..0ca116f8a4 100644 --- a/src/templates/admin/elements/forms/group_journal.html +++ b/src/templates/admin/elements/forms/group_journal.html @@ -93,4 +93,12 @@

    Other

    {% include "admin/elements/forms/field.html" with field=edit_form.use_credit %} +
    +

    Accessibility

    +
    +
    +

    {% trans "Display journal specific accessibility information." %}.

    + {% include "admin/elements/forms/field.html" with field=form.journal_a11y_info %} +
    + diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index 27fd3ade6b..fea86b6010 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,2 +1,4 @@ -

    Journal A11y Placeholder

    -

    journal specific a11y text

    \ No newline at end of file +{% if request.journal.journal_a11y_info %} +

    {% trans "Journal Accessibility Information" %}

    + {{ request.journal.journal_a11y_info|safe }} +{% endif %} \ No newline at end of file From 30dc197520a1189161f8671c49c7f6bb1fa341b9 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 16:40:26 +0100 Subject: [PATCH 06/17] a11y: #4694 a11y-info press setting controls journal level --- .../admin/elements/forms/group_journal.html | 16 +++++++++------- src/templates/common/elements/a11y/journal.html | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/templates/admin/elements/forms/group_journal.html b/src/templates/admin/elements/forms/group_journal.html index 0ca116f8a4..1322809d8c 100644 --- a/src/templates/admin/elements/forms/group_journal.html +++ b/src/templates/admin/elements/forms/group_journal.html @@ -93,12 +93,14 @@

    Other

    {% include "admin/elements/forms/field.html" with field=edit_form.use_credit %} -
    -

    Accessibility

    -
    -
    -

    {% trans "Display journal specific accessibility information." %}.

    - {% include "admin/elements/forms/field.html" with field=form.journal_a11y_info %} -
    +{% if request.press.allow_journal_ally_info %} +
    +

    Accessibility

    +
    +
    +

    {% trans "Display journal specific accessibility information." %}.

    + {% include "admin/elements/forms/field.html" with field=form.journal_a11y_info %} +
    +{% endif %} diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index fea86b6010..58dfe50691 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,4 +1,4 @@ -{% if request.journal.journal_a11y_info %} +{% if request.press.allow_journal_ally_info and request.journal.journal_a11y_info %}

    {% trans "Journal Accessibility Information" %}

    {{ request.journal.journal_a11y_info|safe }} {% endif %} \ No newline at end of file From fd50c1d4d28817f3f75163cc7ad2f22d08a66b2b Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:04:53 +0100 Subject: [PATCH 07/17] a11y: #4694 a11y-info olh a11y page layout updates --- src/themes/OLH/templates/core/a11y.html | 25 ++++++++++++++---------- src/themes/OLH/templates/press/a11y.html | 22 +++++++++++++-------- 2 files changed, 29 insertions(+), 18 deletions(-) diff --git a/src/themes/OLH/templates/core/a11y.html b/src/themes/OLH/templates/core/a11y.html index 6aebfce268..bc441ba434 100644 --- a/src/themes/OLH/templates/core/a11y.html +++ b/src/themes/OLH/templates/core/a11y.html @@ -1,15 +1,20 @@ {% extends "core/base.html" %} -{% load static %} -{% load i18n %} - {% block title %}{% trans "Accessibility" %}{% endblock %} {% block body %} -

    {% trans "Accessibility" %}

    - -{% include "common/elements/a11y/janeway.html" %} -{% include "common/elements/a11y/press.html" %} -{% include "common/elements/a11y/journal.html" %} - -{% endblock body %} \ No newline at end of file +
    +
    +
    +
    +

    {% trans "Accessibility" %}

    + + {% include "common/elements/a11y/janeway.html" %} + {% include "common/elements/a11y/press.html" %} + {% include "common/elements/a11y/journal.html" %} +
    +
    + +
    +
    +{% endblock body %} diff --git a/src/themes/OLH/templates/press/a11y.html b/src/themes/OLH/templates/press/a11y.html index efe3741241..7fe531281a 100644 --- a/src/themes/OLH/templates/press/a11y.html +++ b/src/themes/OLH/templates/press/a11y.html @@ -1,13 +1,19 @@ {% extends "core/base.html" %} -{% load static %} -{% load i18n %} - {% block title %}{% trans "Accessibility" %}{% endblock %} {% block body %} -

    {% trans "Accessibility" %}

    - {% include "common/elements/a11y/janeway.html" %} - {% include "common/elements/a11y/press.html" %} - -{% endblock body %} \ No newline at end of file +
    +
    +
    +
    +

    {% trans "Accessibility" %}

    + + {% include "common/elements/a11y/janeway.html" %} + {% include "common/elements/a11y/press.html" %} +
    +
    + +
    +
    +{% endblock body %} From 4d5c0514d3e8c4cb09af9f2417fbeca617487c94 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:05:18 +0100 Subject: [PATCH 08/17] a11y: #4694 a11y-info journal name as a11y info heading --- src/templates/common/elements/a11y/journal.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index 58dfe50691..cc0146dd8f 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,4 +1,4 @@ {% if request.press.allow_journal_ally_info and request.journal.journal_a11y_info %} -

    {% trans "Journal Accessibility Information" %}

    +

    {{ request.journal.name }}

    {{ request.journal.journal_a11y_info|safe }} {% endif %} \ No newline at end of file From d612d44273e1531b9e6add852c3421bf7ee28bc4 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 19 Sep 2025 10:55:40 +0100 Subject: [PATCH 09/17] a11y: #4694 a11y-info remove journal migration --- .../0069_journal_journal_a11y_info.py | 23 ------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/journal/migrations/0069_journal_journal_a11y_info.py diff --git a/src/journal/migrations/0069_journal_journal_a11y_info.py b/src/journal/migrations/0069_journal_journal_a11y_info.py deleted file mode 100644 index f993f81c6e..0000000000 --- a/src/journal/migrations/0069_journal_journal_a11y_info.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 4.2.20 on 2025-09-08 14:51 - -import core.model_utils -from django.db import migrations - - -class Migration(migrations.Migration): - dependencies = [ - ("journal", "0068_issue_cached_display_title_a11y_and_more"), - ] - - operations = [ - migrations.AddField( - model_name="journal", - name="journal_a11y_info", - field=core.model_utils.JanewayBleachField( - blank=True, - help_text="This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", - null=True, - verbose_name="Journal Accessibility Information", - ), - ), - ] From 25365c7db4b164e65d3ed54b4b2cba33ce41869a Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:31:54 +0100 Subject: [PATCH 10/17] a11y: #4694 a11y-info remove press migration --- ...allow_journal_ally_info_press_ally_info.py | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py diff --git a/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py b/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py deleted file mode 100644 index 70cb141caa..0000000000 --- a/src/press/migrations/0037_press_allow_journal_ally_info_press_ally_info.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 4.2.20 on 2025-09-08 14:31 - -import core.model_utils -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("press", "0036_remove_press_password_reset_text_and_more"), - ] - - operations = [ - migrations.AddField( - model_name="press", - name="allow_journal_ally_info", - field=models.BooleanField( - default=False, - help_text="If enabled, journals can have their own accessibility information as well.", - verbose_name="Allow Journal Accessibility Information", - ), - ), - migrations.AddField( - model_name="press", - name="ally_info", - field=core.model_utils.JanewayBleachField( - blank=True, - help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", - null=True, - verbose_name="Press Accessibility Information", - ), - ), - ] From 7e49121718e28e30155c44d4237907fbccf8774a Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 22 Sep 2025 16:47:06 +0100 Subject: [PATCH 11/17] a11y: #4694 a11y-info replace journal model as setting --- src/core/forms/forms.py | 2 -- src/core/logic.py | 8 ++++++++ src/journal/models.py | 6 ------ .../admin/elements/forms/group_journal.html | 4 ++-- .../common/elements/a11y/journal.html | 4 ++-- src/utils/install/journal_defaults.json | 18 ++++++++++++++++++ 6 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/core/forms/forms.py b/src/core/forms/forms.py index d944619e83..d64e964525 100755 --- a/src/core/forms/forms.py +++ b/src/core/forms/forms.py @@ -491,7 +491,6 @@ class Meta: model = journal_models.Journal fields = ( "contact_info", - "journal_a11y_info", "is_remote", "remote_view_url", "remote_submit_url", @@ -544,7 +543,6 @@ class Meta: model = journal_models.Journal fields = ( "contact_info", - "journal_a11y_info", "header_image", "default_cover_image", "default_large_image", diff --git a/src/core/logic.py b/src/core/logic.py index c37a42bf7f..a88ffd3406 100755 --- a/src/core/logic.py +++ b/src/core/logic.py @@ -637,6 +637,14 @@ def get_settings_to_edit(display_group, journal, user): }, ) + # Add a11y settings only if press allows it + if journal.press.allow_journal_a11y_info: + a11y_settings = ["a11y_public_info"] + a11y_group_of_settings = process_setting_list( + a11y_settings, "a11y", journal + ) + group_of_settings.extend(a11y_group_of_settings) + elif display_group == "proofing": proofing_settings = ["max_proofreaders"] group_of_settings = process_setting_list(proofing_settings, "general", journal) diff --git a/src/journal/models.py b/src/journal/models.py index 1b9539ef01..b441b05cfe 100644 --- a/src/journal/models.py +++ b/src/journal/models.py @@ -197,12 +197,6 @@ class Journal(AbstractSiteModel): contact_info = JanewayBleachField( null=True, blank=True, verbose_name="Contact Information" ) - journal_a11y_info = JanewayBleachField( - null=True, - blank=True, - verbose_name="Journal Accessibility Information", - help_text="This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", - ) keywords = models.ManyToManyField( "submission.Keyword", blank=True, diff --git a/src/templates/admin/elements/forms/group_journal.html b/src/templates/admin/elements/forms/group_journal.html index 1322809d8c..8dd94750fc 100644 --- a/src/templates/admin/elements/forms/group_journal.html +++ b/src/templates/admin/elements/forms/group_journal.html @@ -98,8 +98,8 @@

    Other

    Accessibility

    -

    {% trans "Display journal specific accessibility information." %}.

    - {% include "admin/elements/forms/field.html" with field=form.journal_a11y_info %} +

    {% trans "Display journal specific accessibility information." %}

    + {% include "admin/elements/forms/field.html" with field=edit_form.a11y_public_info %}
    {% endif %} diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index cc0146dd8f..ee396c1f85 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,4 +1,4 @@ -{% if request.press.allow_journal_ally_info and request.journal.journal_a11y_info %} +{% if request.press.allow_journal_ally_info and request.journal.a11y_public_info %}

    {{ request.journal.name }}

    - {{ request.journal.journal_a11y_info|safe }} + {{ request.journal.a11y_public_info|safe }} {% endif %} \ No newline at end of file diff --git a/src/utils/install/journal_defaults.json b/src/utils/install/journal_defaults.json index 321648e08e..741003ba02 100644 --- a/src/utils/install/journal_defaults.json +++ b/src/utils/install/journal_defaults.json @@ -5596,5 +5596,23 @@ "editor", "journal-manager" ] + }, + { + "group": { + "name": "a11y" + }, + "setting": { + "description": "This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", + "is_translatable": true, + "name": "a11y_public_info", + "pretty_name": "Accessibility Information for the Public", + "type": "rich-text" + }, + "value": { + "default": "" + }, + "editable_by": [ + "journal-manager" + ] } ] From 08f69168487ae5786b82ece26c1768565a94e5e5 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:45:07 +0100 Subject: [PATCH 12/17] a11y: #4694 a11y-info typo replace ally with a11y --- src/press/forms.py | 2 +- src/press/models.py | 2 +- src/templates/admin/elements/forms/group_journal.html | 2 +- src/templates/admin/press/edit_press.html | 2 +- src/templates/common/elements/a11y/journal.html | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/press/forms.py b/src/press/forms.py index 11585f4050..168ca0f52b 100755 --- a/src/press/forms.py +++ b/src/press/forms.py @@ -42,7 +42,7 @@ class Meta: "disable_journals", "privacy_policy_url", "ally_info", - "allow_journal_ally_info", + "allow_journal_a11y_info", ) widgets = { "theme": forms.Select(choices=logic.get_theme_list()), diff --git a/src/press/models.py b/src/press/models.py index ba9dcf2e69..b8fb17bc67 100755 --- a/src/press/models.py +++ b/src/press/models.py @@ -190,7 +190,7 @@ class Press(AbstractSiteModel): verbose_name="Press Accessibility Information", help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", ) - allow_journal_ally_info = models.BooleanField( + allow_journal_a11y_info = models.BooleanField( default=False, verbose_name="Allow Journal Accessibility Information", help_text="If enabled, journals can have their own accessibility information as well.", diff --git a/src/templates/admin/elements/forms/group_journal.html b/src/templates/admin/elements/forms/group_journal.html index 8dd94750fc..9394033970 100644 --- a/src/templates/admin/elements/forms/group_journal.html +++ b/src/templates/admin/elements/forms/group_journal.html @@ -93,7 +93,7 @@

    Other

    {% include "admin/elements/forms/field.html" with field=edit_form.use_credit %} -{% if request.press.allow_journal_ally_info %} +{% if request.press.allow_journal_a11y_info %}

    Accessibility

    diff --git a/src/templates/admin/press/edit_press.html b/src/templates/admin/press/edit_press.html index 96066e5d3e..c9d9ecf32e 100644 --- a/src/templates/admin/press/edit_press.html +++ b/src/templates/admin/press/edit_press.html @@ -61,7 +61,7 @@

    Security

    Accessibility

    {{ form.ally_info|foundation }} - {{ form.allow_journal_ally_info|foundation }} + {{ form.allow_journal_a11y_info|foundation }} diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index ee396c1f85..acf2716bd4 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,4 +1,4 @@ -{% if request.press.allow_journal_ally_info and request.journal.a11y_public_info %} +{% if request.press.allow_journal_a11y_info and request.journal.a11y_public_info %}

    {{ request.journal.name }}

    {{ request.journal.a11y_public_info|safe }} {% endif %} \ No newline at end of file From f6281200114a6c92fd6b36695ef98293d1ee8990 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Mon, 22 Sep 2025 16:54:29 +0100 Subject: [PATCH 13/17] a11y: #4694 a11y-info make journal setting press dependent --- src/core/logic.py | 10 +++------- src/core/models.py | 7 +++++++ src/core/views.py | 19 +++++++++++++++++++ src/utils/install.py | 5 +++++ src/utils/install/journal_defaults.json | 1 + 5 files changed, 35 insertions(+), 7 deletions(-) diff --git a/src/core/logic.py b/src/core/logic.py index a88ffd3406..decdc18e31 100755 --- a/src/core/logic.py +++ b/src/core/logic.py @@ -637,13 +637,9 @@ def get_settings_to_edit(display_group, journal, user): }, ) - # Add a11y settings only if press allows it - if journal.press.allow_journal_a11y_info: - a11y_settings = ["a11y_public_info"] - a11y_group_of_settings = process_setting_list( - a11y_settings, "a11y", journal - ) - group_of_settings.extend(a11y_group_of_settings) + a11y_settings = ["a11y_public_info"] + a11y_group_of_settings = process_setting_list(a11y_settings, "a11y", journal) + group_of_settings.extend(a11y_group_of_settings) elif display_group == "proofing": proofing_settings = ["max_proofreaders"] diff --git a/src/core/models.py b/src/core/models.py index e02a2ab8b3..c5594dfd0a 100644 --- a/src/core/models.py +++ b/src/core/models.py @@ -1101,6 +1101,13 @@ class Setting(models.Model): is_translatable = models.BooleanField(default=False) + is_press_dependent = models.CharField( + max_length=100, + null=True, + blank=True, + help_text="If set, this setting is only available when the specified press setting is enabled.", + ) + editable_by = models.ManyToManyField( Role, blank=True, diff --git a/src/core/views.py b/src/core/views.py index 023c8c5c2f..1bc1696fff 100755 --- a/src/core/views.py +++ b/src/core/views.py @@ -1091,6 +1091,25 @@ def settings_index(request): editable_by__in=request.user.roles_for_journal(request.journal) ) + if request.journal: + press = request.journal.press + filtered_settings = [] + for setting in settings: + if ( + hasattr(setting, "is_press_dependent") + and setting.is_press_dependent + and setting.is_press_dependent.strip() + ): + # This setting is press-dependent, check if the press setting allows it + press_setting_value = getattr(press, setting.is_press_dependent, False) + if press_setting_value: + filtered_settings.append(setting) + else: + # Non-press-dependent settings are always included + filtered_settings.append(setting) + + settings = filtered_settings + template = "core/manager/settings/index.html" context = { "settings": settings, diff --git a/src/utils/install.py b/src/utils/install.py index abdead6bec..4959812b3d 100755 --- a/src/utils/install.py +++ b/src/utils/install.py @@ -50,6 +50,11 @@ def update_settings( "is_translatable": item["setting"].get("is_translatable"), } + if "is_press_dependent" in item["setting"]: + setting_defaults["is_press_dependent"] = item["setting"][ + "is_press_dependent" + ] + setting, created = core_models.Setting.objects.get_or_create( name=item["setting"].get("name"), group=setting_group, diff --git a/src/utils/install/journal_defaults.json b/src/utils/install/journal_defaults.json index 741003ba02..21ed1b0fde 100644 --- a/src/utils/install/journal_defaults.json +++ b/src/utils/install/journal_defaults.json @@ -5604,6 +5604,7 @@ "setting": { "description": "This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", "is_translatable": true, + "is_press_dependent": "allow_journal_a11y_info", "name": "a11y_public_info", "pretty_name": "Accessibility Information for the Public", "type": "rich-text" From c4cff55656c04db9555aa074fc99ca24d8a1e0b3 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 19 Sep 2025 12:58:34 +0100 Subject: [PATCH 14/17] a11y: #4694 a11y-info load settings on journal a11y template --- src/templates/common/elements/a11y/journal.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/templates/common/elements/a11y/journal.html b/src/templates/common/elements/a11y/journal.html index acf2716bd4..eb728099aa 100644 --- a/src/templates/common/elements/a11y/journal.html +++ b/src/templates/common/elements/a11y/journal.html @@ -1,4 +1,5 @@ -{% if request.press.allow_journal_a11y_info and request.journal.a11y_public_info %} +{% load settings %} +{% if request.press.allow_journal_a11y_info and request.journal|setting:'a11y_public_info'|safe %}

    {{ request.journal.name }}

    - {{ request.journal.a11y_public_info|safe }} + {{ request.journal|setting:'a11y_public_info'|safe }} {% endif %} \ No newline at end of file From 27ccb1858226038702081a3bc9032a43635e8302 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Tue, 23 Sep 2025 08:56:38 +0100 Subject: [PATCH 15/17] a11y: #4694 a11y-info fix clean journal footer a11y link order --- src/themes/clean/templates/elements/journal_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/clean/templates/elements/journal_footer.html b/src/themes/clean/templates/elements/journal_footer.html index 9ba7991304..dce274364a 100644 --- a/src/themes/clean/templates/elements/journal_footer.html +++ b/src/themes/clean/templates/elements/journal_footer.html @@ -51,8 +51,8 @@
  • {% trans "Privacy Policy" %}
  • {% endif %} -
  • {% trans "Accessibility" %}
  • {% trans "Contact" %}
  • +
  • {% trans "Accessibility" %}
  • {% if not request.user.is_authenticated %}
  • From 7684e02b694f65729a32d1e8ce699c3eced947a2 Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 26 Sep 2025 10:52:08 +0100 Subject: [PATCH 16/17] a11y: #4694 a11y-info changes requested to press-dependent setting --- src/core/models.py | 3 +-- src/core/views.py | 31 ++++++++++++------------- src/press/models.py | 1 - src/utils/install.py | 6 +---- src/utils/install/journal_defaults.json | 2 +- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/src/core/models.py b/src/core/models.py index c5594dfd0a..e3a0fe8d2e 100644 --- a/src/core/models.py +++ b/src/core/models.py @@ -1101,9 +1101,8 @@ class Setting(models.Model): is_translatable = models.BooleanField(default=False) - is_press_dependent = models.CharField( + depends_on_press_field = models.CharField( max_length=100, - null=True, blank=True, help_text="If set, this setting is only available when the specified press setting is enabled.", ) diff --git a/src/core/views.py b/src/core/views.py index 1bc1696fff..c6e297da3d 100755 --- a/src/core/views.py +++ b/src/core/views.py @@ -1093,22 +1093,21 @@ def settings_index(request): if request.journal: press = request.journal.press - filtered_settings = [] - for setting in settings: - if ( - hasattr(setting, "is_press_dependent") - and setting.is_press_dependent - and setting.is_press_dependent.strip() - ): - # This setting is press-dependent, check if the press setting allows it - press_setting_value = getattr(press, setting.is_press_dependent, False) - if press_setting_value: - filtered_settings.append(setting) - else: - # Non-press-dependent settings are always included - filtered_settings.append(setting) - - settings = filtered_settings + # Filter out press-dependent settings where the press setting is False + press_dependent_settings = settings.filter( + depends_on_press_field__isnull=False + ).exclude(depends_on_press_field="") + + # Get the press setting values for these settings + excluded_settings = [] + for setting in press_dependent_settings: + press_setting_value = getattr(press, setting.depends_on_press_field, False) + if not press_setting_value: + excluded_settings.append(setting.id) + + # Exclude settings where press setting is False + if excluded_settings: + settings = settings.exclude(id__in=excluded_settings) template = "core/manager/settings/index.html" context = { diff --git a/src/press/models.py b/src/press/models.py index b8fb17bc67..ea306fa6bb 100755 --- a/src/press/models.py +++ b/src/press/models.py @@ -186,7 +186,6 @@ class Press(AbstractSiteModel): ) ally_info = JanewayBleachField( blank=True, - null=True, verbose_name="Press Accessibility Information", help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", ) diff --git a/src/utils/install.py b/src/utils/install.py index 4959812b3d..d878418f3d 100755 --- a/src/utils/install.py +++ b/src/utils/install.py @@ -48,13 +48,9 @@ def update_settings( "pretty_name": item["setting"].get("pretty_name"), "description": item["setting"].get("description"), "is_translatable": item["setting"].get("is_translatable"), + "depends_on_press_field": item["setting"].get("depends_on_press_field"), } - if "is_press_dependent" in item["setting"]: - setting_defaults["is_press_dependent"] = item["setting"][ - "is_press_dependent" - ] - setting, created = core_models.Setting.objects.get_or_create( name=item["setting"].get("name"), group=setting_group, diff --git a/src/utils/install/journal_defaults.json b/src/utils/install/journal_defaults.json index 21ed1b0fde..63265bbab1 100644 --- a/src/utils/install/journal_defaults.json +++ b/src/utils/install/journal_defaults.json @@ -5604,7 +5604,7 @@ "setting": { "description": "This is information about the accessibility of user-content. It will appear on the accessibility page under the journal name.", "is_translatable": true, - "is_press_dependent": "allow_journal_a11y_info", + "depends_on_press_field": "allow_journal_a11y_info", "name": "a11y_public_info", "pretty_name": "Accessibility Information for the Public", "type": "rich-text" From d6f408c3b59a5123ee984d059fb8f053d5cf574d Mon Sep 17 00:00:00 2001 From: StephDriver <5330770+StephDriver@users.noreply.github.com> Date: Fri, 26 Sep 2025 10:55:08 +0100 Subject: [PATCH 17/17] a11y: #4694 a11y-info migrate a11y info page settings --- .../0110_setting_depends_on_press_field.py | 21 +++++++++++++ ...allow_journal_a11y_info_press_ally_info.py | 31 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 src/core/migrations/0110_setting_depends_on_press_field.py create mode 100644 src/press/migrations/0037_press_allow_journal_a11y_info_press_ally_info.py diff --git a/src/core/migrations/0110_setting_depends_on_press_field.py b/src/core/migrations/0110_setting_depends_on_press_field.py new file mode 100644 index 0000000000..8eaf873c75 --- /dev/null +++ b/src/core/migrations/0110_setting_depends_on_press_field.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.20 on 2025-09-26 09:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("core", "0109_salutation_name_20250707_1420"), + ] + + operations = [ + migrations.AddField( + model_name="setting", + name="depends_on_press_field", + field=models.CharField( + blank=True, + help_text="If set, this setting is only available when the specified press setting is enabled.", + max_length=100, + ), + ), + ] diff --git a/src/press/migrations/0037_press_allow_journal_a11y_info_press_ally_info.py b/src/press/migrations/0037_press_allow_journal_a11y_info_press_ally_info.py new file mode 100644 index 0000000000..38ba876eab --- /dev/null +++ b/src/press/migrations/0037_press_allow_journal_a11y_info_press_ally_info.py @@ -0,0 +1,31 @@ +# Generated by Django 4.2.20 on 2025-09-26 09:53 + +import core.model_utils +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("press", "0036_remove_press_password_reset_text_and_more"), + ] + + operations = [ + migrations.AddField( + model_name="press", + name="allow_journal_a11y_info", + field=models.BooleanField( + default=False, + help_text="If enabled, journals can have their own accessibility information as well.", + verbose_name="Allow Journal Accessibility Information", + ), + ), + migrations.AddField( + model_name="press", + name="ally_info", + field=core.model_utils.JanewayBleachField( + blank=True, + help_text="This is information about the accessiblity of user-content. It will appear on the accessibility page under the press name.", + verbose_name="Press Accessibility Information", + ), + ), + ]