# Farol v0.2.0 - Table of Contents

> Accessibility testing for Phoenix LiveView. Pure Elixir, zero node, with rules that understand phx-click and friends.

## Pages

- [farol](readme.md)

## Modules

- [Farol](Farol.md): Farol is accessibility testing for Phoenix LiveView, in pure Elixir.
- [Farol.Adapter](Farol.Adapter.md): Turns a source format into a forest of `Farol.Node`.
- [Farol.Adapter.HEEx](Farol.Adapter.HEEx.md): Parses HEEx template source into `Farol.Node` trees, statically.
- [Farol.Adapter.HTML](Farol.Adapter.HTML.md): Parses rendered HTML strings into `Farol.Node` trees via `lazy_html`
(the lexbor engine, through a precompiled NIF).
- [Farol.Assertions](Farol.Assertions.md): ExUnit integration: `assert_accessible/2` for rendered HTML.
- [Farol.Contrast](Farol.Contrast.md): WCAG 2.2 contrast math over hex colors.
- [Farol.Finding](Farol.Finding.md): One accessibility violation, tied to the rule that caught it.
- [Farol.Node](Farol.Node.md): The normalized element every rule sees.
- [Farol.Report](Farol.Report.md): Renders findings into the didactic terminal report.
- [Farol.Report.SARIF](Farol.Report.SARIF.md): Renders findings as SARIF 2.1.0, the format GitHub code scanning (and
most other CI annotation surfaces) consumes.
- [Farol.Rule](Farol.Rule.md): The contract every accessibility rule implements.
- [Farol.Rules.ButtonName](Farol.Rules.ButtonName.md): Buttons need an accessible name.
- [Farol.Rules.ContrastToken](Farol.Rules.ContrastToken.md): Inline colors, resolved through a declared token map, checked against
WCAG AA contrast ratios.
- [Farol.Rules.DocumentTitle](Farol.Rules.DocumentTitle.md): Documents need a non-empty <title>.
- [Farol.Rules.DuplicateId](Farol.Rules.DuplicateId.md): Ids must be unique per document.
- [Farol.Rules.FocusAfterPatch](Farol.Rules.FocusAfterPatch.md): Containers patched by LiveView can swallow the user's focus.

- [Farol.Rules.HeadingOrder](Farol.Rules.HeadingOrder.md): Heading levels must not skip: an h3 after an h1 means a missing h2.
- [Farol.Rules.HtmlLang](Farol.Rules.HtmlLang.md): The <html> element must declare the page language.
- [Farol.Rules.IframeTitle](Farol.Rules.IframeTitle.md): Iframes need a title describing their content.
- [Farol.Rules.ImgAlt](Farol.Rules.ImgAlt.md): Images need alternative text, or an explicit marker that they are decorative.
- [Farol.Rules.LabelAssociation](Farol.Rules.LabelAssociation.md): Every form control needs a programmatically associated label.
- [Farol.Rules.LandmarkRegions](Farol.Rules.LandmarkRegions.md): Page content should live inside landmark regions.
- [Farol.Rules.LinkName](Farol.Rules.LinkName.md): Links need an accessible name that makes sense out of context.
- [Farol.Rules.LiveRegionUsage](Farol.Rules.LiveRegionUsage.md): Flash messages outside an aria-live region are announced to nobody.
- [Farol.Rules.NoAriaOnHidden](Farol.Rules.NoAriaOnHidden.md): aria on hidden elements is dead code: nothing announces it.
- [Farol.Rules.PhxClickInteractive](Farol.Rules.PhxClickInteractive.md): phx-click on a non-interactive element is mouse-only by default.
- [Farol.Rules.ToggleAriaPairing](Farol.Rules.ToggleAriaPairing.md): JS.toggle/show/hide triggers must announce the state they control.
- [Farol.Rules.ValidAriaAttr](Farol.Rules.ValidAriaAttr.md): aria-* attributes must exist in the ARIA specification (typo catcher).
- [Farol.Rules.ValidRole](Farol.Rules.ValidRole.md): role values must come from the ARIA specification.

## Mix Tasks

- [mix farol](Mix.Tasks.Farol.md): Statically audits HEEx templates for accessibility issues.

