Overview
Buttons must use the <button> element or role="button" with full keyboard support. Using <div> or <span> for buttons is a common accessibility failure.
The Problem
This pattern is inaccessible — avoid it.
The Fix
Use this accessible pattern instead.
Step-by-step
Use <button> for actions and <a href="..."> for navigation — never use <div> or <span>.
Always set type="submit" or type="button" to prevent unexpected form submission.
If you must use a div (e.g., in a legacy system), add: role="button", tabindex="0", and handle both click and keydown (Enter and Space).
Framework Notes
How to apply this fix in your stack.