e11y-fix

Solid

Reference guide for fixing axe-core/WCAG errors in Phoenix LiveView - maps common violations to Phoenix-specific fixes

Testing & QA 42 stars 5 forks Updated 3 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

Stars 20%
54
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Excessibility Fix - axe-core Error Reference Quick reference for fixing axe-core/WCAG errors in Phoenix LiveView applications. ## Debugging Workflow 1. Run `mix excessibility` to see axe-core errors 2. Use `html_snapshot(view)` to capture the problematic state 3. Read snapshot file to see exact HTML 4. Apply fix from reference below 5. Re-run `mix excessibility` to verify ## Quick Reference | axe-core Error | WCAG Rule | Phoenix Fix | |-------------|-----------|-------------| | Form input without label | 1.3.1 | Add `<.label>` or `aria-label` | | Missing alt text | 1.1.1 | Add `alt` attribute to `<img>` | | Low contrast | 1.4.3 | Adjust Tailwind colors | | Missing lang | 3.1.1 | Add `lang="en"` to `<html>` | | Empty link | 2.4.4 | Add link text or `aria-label` | | Missing heading structure | 1.3.1 | Use proper `<h1>`-`<h6>` hierarchy | | No skip link | 2.4.1 | Add "Skip to content" link | ## Common Fixes by Category ### Forms #### Input without label **Error:** "Form element does not have a label" ```heex <!-- Bad --> <input type="text" name="email" /> <!-- Good: Using Phoenix form helpers --> <.input field={@form[:email]} type="email" label="Email address" /> <!-- Good: Manual label --> <label for="email">Email address</label> <input type="text" name="email" id="email" /> <!-- Good: aria-label for icon-only --> <input type="search" aria-label="Search" /> ``` #### Form without submit button **Note:** LiveView forms using `phx-submit` often don't need a visibl...

Details

Author
lessthanseventy
Repository
lessthanseventy/excessibility
Created
3 years ago
Last Updated
3 weeks ago
Language
Elixir
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category