Can Eleventy enforce heading hierarchy and required alt text without custom plugins?
0 reputation · 20 Dec 2024, 14:09 UTC
Improving accessibility in the Eleventy authoring workflow requires reliable checks for document outline and image alt text without relying on manual review.
Eleventy core does not validate heading hierarchy across template includes or layouts, and template languages allow arbitrary heading levels in partials. The official eleventy-img plugin generates responsive markup but does not auto-populate alt attributes; authors must supply alt text via front matter or data. No built-in accessibility linting runs during eleventy --serve or production builds, and the dev server has no integration with axe-core or Lighthouse CI. Incremental builds can skip re-rendering included partials when only data changes.
Does Eleventy provide a documented build-time mechanism to validate heading hierarchy for WCAG 1.3.1 compliance? Which configuration, if any, makes alt text required when using eleventy-img? When does an incremental build guarantee updated heading structures in the output?