Modules
Farol is accessibility testing for Phoenix LiveView, in pure Elixir.
Turns a source format into a forest of Farol.Node.
Parses HEEx template source into Farol.Node trees, statically.
Parses rendered HTML strings into Farol.Node trees via lazy_html
(the lexbor engine, through a precompiled NIF).
ExUnit integration: assert_accessible/2 for rendered HTML.
WCAG 2.2 contrast math over hex colors.
One accessibility violation, tied to the rule that caught it.
The normalized element every rule sees.
Renders findings into the didactic terminal report.
Renders findings as SARIF 2.1.0, the format GitHub code scanning (and most other CI annotation surfaces) consumes.
The contract every accessibility rule implements.
Buttons need an accessible name.
Inline colors, resolved through a declared token map, checked against WCAG AA contrast ratios.
Documents need a non-empty <title>.
Ids must be unique per document.
Containers patched by LiveView can swallow the user's focus.
Heading levels must not skip: an h3 after an h1 means a missing h2.
The <html> element must declare the page language.
Iframes need a title describing their content.
Images need alternative text, or an explicit marker that they are decorative.
Every form control needs a programmatically associated label.
Page content should live inside landmark regions.
Links need an accessible name that makes sense out of context.
Flash messages outside an aria-live region are announced to nobody.
aria on hidden elements is dead code: nothing announces it.
phx-click on a non-interactive element is mouse-only by default.
JS.toggle/show/hide triggers must announce the state they control.
aria-* attributes must exist in the ARIA specification (typo catcher).
role values must come from the ARIA specification.
Mix Tasks
Statically audits HEEx templates for accessibility issues.