{#- Chirp form field macros — importable via {% from "chirp/forms.html" import ... %} Each macro renders a labelled form field with inline error display. Works with the ``field_errors`` filter and ``ValidationError``. ARIA attributes (aria-invalid, aria-describedby, aria-required, role) are emitted automatically based on error and required state. Usage: {% from "chirp/forms.html" import text_field, textarea_field, select_field %} {{ text_field("title", form.title ?? "", label="Title", errors=errors, required=true) }} -#} {# Text input with label and error display #} {% def text_field(name, value="", label=none, errors=none, type="text", required=false, placeholder="", attrs="") %} {% set field_errors_list = errors | field_errors(name) %}