Skip to content

Instantly share code, notes, and snippets.

@arjunattam
Last active May 29, 2020 03:35
Show Gist options
  • Save arjunattam/e7a5d6bf25ffab2a1b972bbc3bf1db9f to your computer and use it in GitHub Desktop.
Save arjunattam/e7a5d6bf25ffab2a1b972bbc3bf1db9f to your computer and use it in GitHub Desktop.

Accessibility testing with Playwright [WIP]

Why

  • native input events

Common issues

  • Unable to read
    • Incorrect screen reader (VoiceOver) behavior
      • Focus landing on wrong element
      • Focus order is incorrect
    • Missing alt-text (static violations)
  • Unable to interact
    • Enter to click a link
    • Left/right to select options
    • Form interactions: checkbox space
  • Special elements

Recommended patterns

  • Autofocus or not
    • Google has auto-focus
    • most blind users always intuitively press Ctrl + Home first ("Auto focus workaround")

Techniques to solving

Other approaches

  • Press tab to check all interactive elements are covered
    • Including "fake buttons (div)"
  • Roving tabindex for custom components

Limitations

  • Regressions – and not exploratory
    • How to avoid? Always define behavior if current element is in focus?

Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment