Keyboard Accessible Custom Controls with WAI-ARIA & JavaScript

<button>

<div role=button>

onclick (no tabindex)
onclick
onclick onkeyup Enter
onclick onkeyup Enter + Spacebar
onkeydown Enter + Spacebar

<img role=button>

onclick (no tabindex)
onclick
onclick onkeyup Enter
onclick onkeyup Enter + Spacebar

<a href=# role=button>

PURPOSEFUL

AMOUNTS

OF

WHITE

SPACE

TO

DEMONSTRATE

preventDefault()

YOU

MAY

NEED

TO

ENLARGE

TEXT

THEN

CLICK

NEXT

LINK

onclick onclick preventDefault() onclick preventDefault() onkeyup Spacebar

Event Status