{{ seg.section_title }}
{% if not seg.untimed %} {% endif %} {# Per-element include flags decide what carries over. A scene description (when present AND included) is the long-form image description, so the
{% for para in seg.description.split('\n\n') if para.strip() %}
{% endif %}
{% if seg.ocr_text and seg.on_screen_text_included %}
{# No aria-label on the {{ para.strip() }}
{% endfor %}: the is the accessible
name. Adding aria-label would either override the summary
(inconsistent visual/AT names — WCAG 2.5.3 violation) or just
duplicate it. #}
is the accessible
name. Adding aria-label would either override the summary
(inconsistent visual/AT names — WCAG 2.5.3 violation) or just
duplicate it. #}
On-screen text from video
{{ seg.ocr_text|format_ocr }}
{% endif %}
{% set show_transcript = seg.narration and seg.transcript_included %}
{% if seg.audio_included and (seg.audio_data_uri or seg.audio_filename) %}
{% set audio_label = 'Narration audio for ' ~ seg.section_title ~ ' at ' ~ (seg.start_seconds | timestamp) %}
{# Only reference the transcript via aria-describedby when it's
actually rendered. A dangling describedby is an ARIA validity
bug (WCAG 4.1.2 / 1.3.1) some screen readers silently swallow. #}
{% set audio_describedby = ' aria-describedby="narration-' ~ seg.index ~ '"' if show_transcript else '' %}
{% if seg.audio_data_uri %}
{% else %}
{% endif %}
{% endif %}
{% if show_transcript %}
{# Transcript — collapsed by default. The labels the
block for AT, replacing the prior sr-only . The narration
body keeps a stable id so the section's
On-screen text from video
{{ seg.ocr_text|format_ocr }}