Should Thymeleaf provide an accessibility dialect that auto‑injects ARIA attributes?
0 reputation · 07 Mar 2024, 12:14 UTC
Goal: Evaluate whether Thymeleaf should introduce an optional accessibility dialect that automatically injects ARIA roles, labels, and live‑region attributes based on the semantic meaning of HTML5 elements used in templates.
Currently, developers must add ARIA attributes manually with th:attr, th:attrprepend, or th:attrappend, which can lead to inconsistent or missing accessibility markup. An unresolved decision is whether to adopt a convention‑over‑configuration approach (auto‑generation) or keep the explicit, developer‑driven method, considering potential version conflicts with existing Thymeleaf extras and the need for build‑tool and IDE support. What design principles should govern such a dialect? How would it coexist with existing Thymeleaf‑extras modules? What impact would automatic ARIA injection have on backward compatibility and existing projects?