From 3df0e4d48afddae32c3f376be9111f7792aaf548 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 27 Nov 2025 14:24:36 -0500 Subject: [PATCH] Add comprehensive ARIA labels and resource route tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accessibility Improvements: - Add ARIA roles and labels to search.html (search form, results, status messages) - Add ARIA landmarks to resource_detail.html (article, sections, navigation) - Add ARIA landmarks to resource_index.html (TOC, sections, verse lists) - Add aria-hidden to decorative SVG icons throughout templates - Implement aria-labelledby for sectioning elements - Add role="list" and role="listitem" for verse lists Test Coverage: - Create comprehensive test_resource_routes.py with 76 new tests - Test 26+ resource index pages (angels, prophets, parables, etc.) - Test systematic theology routes (trinity, christology, soteriology, etc.) - Test special topic routes (messianic prophecies, types/shadows, etc.) - Test doctrinal routes (grace, justification, sanctification, etc.) - Test detail pages and 404 handling for invalid slugs - Test HTML structure and content types All 252 tests passing (up from 176). Improved WCAG 2.1 compliance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/templates/resource_detail.html | 28 +- kjvstudy_org/templates/resource_index.html | 24 +- kjvstudy_org/templates/search.html | 13 +- tests/test_resource_routes.py | 622 ++++++++++++++++++++ 4 files changed, 656 insertions(+), 31 deletions(-) create mode 100644 tests/test_resource_routes.py diff --git a/kjvstudy_org/templates/resource_detail.html b/kjvstudy_org/templates/resource_detail.html index 7150ffd..882f75a 100644 --- a/kjvstudy_org/templates/resource_detail.html +++ b/kjvstudy_org/templates/resource_detail.html @@ -109,6 +109,7 @@ {% endblock %} {% block content %} +
{% if category_name %}
{{ category_name }}
{% endif %} @@ -117,8 +118,8 @@ {% if pdf_available and pdf_url %} {% endif %} -
-

Description

+
+

Description

{{ item.description | link_names | link_verses | safe }}
{% if item.family_tree_link %}

- View {{ item_name }} in Family Tree → + View {{ item_name }} in Family Tree →

{% endif %}
-
-

Key Verses

-
+
+

Key Verses

+
{% for verse in item.verses %} -
+
{% set ref_parts = verse.reference.rsplit(' ', 1) %} {% if ref_parts|length == 2 %} @@ -151,7 +152,7 @@ {% if ':' in chapter_verse %} {% set ch = chapter_verse.split(':')[0] %} {% set v = chapter_verse.split(':')[1] %} - {{ verse.reference }} + {{ verse.reference }} {% else %} {{ verse.reference }} {% endif %} @@ -164,7 +165,8 @@ {% endfor %}
-
-

← Back to {{ back_text }}

-
+ +
{% endblock %} diff --git a/kjvstudy_org/templates/resource_index.html b/kjvstudy_org/templates/resource_index.html index 85efe18..0fb030d 100644 --- a/kjvstudy_org/templates/resource_index.html +++ b/kjvstudy_org/templates/resource_index.html @@ -178,8 +178,8 @@ {% if pdf_available %}
- - + + Download All (PDF) @@ -188,18 +188,18 @@ {% endif %} {% if page_description %} -
+

{{ page_description | mdi | link_names | link_verses | safe }}

{% endif %} -