bekahhw/accessibility-wcag icon
public
Published on 7/24/2025
Accessibility Rules

Rules

Accessibility Guidelines

  • Follow W3C’s Web Content Accessibility Guidelines (WCAG) 2.2 for all frontend code and UI implementations.
  • Use semantic HTML to structure content. Use proper elements for headings, lists, landmarks, tables, forms, etc., rather than divs or spans.
  • Ensure sufficient color contrast for text and important UI elements. Use color schemes that meet WCAG 2.2 contrast ratios (at least 4.5:1 for normal text). Do not rely on color alone to convey information — use icons, patterns, or text labels as needed in addition to color cues.
  • Make all functionality keyboard-accessible. Users must be able to navigate and operate all interactive components using a keyboard alone. Ensure a visible focus indicator is present on focused elements. Do not remove the browser’s default focus outline without providing an equivalent visible style.
  • Use ARIA attributes sparingly and appropriately. Only use WAI-ARIA roles/properties when native HTML elements can’t achieve the desired accessible behavior. (Prefer semantic HTML elements with built-in accessibility over adding ARIA roles to non-semantic elements.)
  • Adhere to these accessibility practices in all code