{% set cid = c.id if c.id else ("live-" ~ c.live_source) %}
{% set content_id = "live-content-" ~ (c.live_source if c.live_source else cid) %}
{% if c.title %}
{{ c.title }}
{% endif %}
{# Announced when it appears, rather than being a purely visual warning. #}
⚠ {{ not_updating_text }}
{# Auto-updating content must be pausable (WCAG 2.2.2). The control is
rendered server-side so it exists before the JS compiler runs, and is
hidden without JS where there is nothing to pause. #}
{# role="log" + aria-live=polite: new lines are announced as they arrive,
without stealing focus. aria-atomic=false so only the addition is read,
not the whole buffer each time. #}
{% if content_html is not none %}
{{ content_html }}
{% elif live_data is mapping %}
{% for k, v in live_data.items() %}
{% if k == "line" %}
{# No fallback: an auto-reloading page with no
way to stop it fails WCAG 2.2.1 (Timing Adjustable) and 3.2.5, and it
also discards any work in progress on the page. No-JS users get a plain
reload link instead, which they control. #}