Drupal 11.2 added HTMX as a core dependency under the Replace AJAX API with HTMX community initiative. Drupal 11.3 shipped the full integration: a factory class exposing every HTMX attribute and response header to render arrays, and a FormBuilder that makes all form values available when a form is rebuilt from an HTMX request. The core blog reports up to 71% less JavaScript for browser-server interactions. Contrib is following — views_htmx already replaces the legacy Ajax framework for exposed filters, pagination, and table sorting.
This session works through five failure modes on a live Drupal 11.3 site, each demonstrated with a screen reader running before and after the fix:
- Focus destruction.
hx-swap="outerHTML"On a target containing the focused element drops focus to<body>. Restoration strategies,hx-preserve, and swap/settle timing. - Silent updates. HTMX ships no live-region semantics. Why the
aria-liveregion must live outside the swap target, howaria-busycommunicates in-flight state, and whyhx-indicatoris visual-only. - Auto-submitting exposed filters. Debouncing, polite result-count announcements, and not stealing focus from the control the user is still operating.
- Non-semantic triggers.
<div hx-get>has no role, no focusability, and no keyboard affordance. Progressive enhancement from a real<a href>or formaction, so the interface degrades instead of disappearing. hx-push-urland route announcement. Back-button behaviour, document title updates, and the SPA-era problem of navigation happening with nobody told — now reachable from a server-rendered Drupal site.
The session then covers HTMX-rebuilt forms specifically: moving focus to an error summary, keeping aria-describedby wiring intact across a swap, and reattaching Drupal.behaviors with once() when custom JavaScript doesn't survive the replacement.