{# macros/a11y.html — reusable accessibility helpers. v0.62 CSS refactor: sr-only renamed to .visually-hidden (defined in utilities.css); skip_link styled via .dz-skip-link in components/fragments.css; loading_spinner uses .dz-loading-spinner wrapper + .dz-loading-spinner-icon. #} {# Screen-reader-only text #} {% macro sr_only(text) %} {{ text }} {% endmacro %} {# Visually hidden but focusable skip link #} {% macro skip_link(target="#main-content", text="Skip to main content") %} {{ text }} {% endmacro %} {# Icon with accessible label — decorative by default #} {% macro icon(svg, label=None) %} {% if label %} {{ svg | safe }} {% else %} {% endif %} {% endmacro %} {# Loading spinner with live announcement #} {% macro loading_spinner(label="Loading", id=None) %}
{{ label }}
{% endmacro %}