Button

Keyboard

Press Tab to move between buttons and Enter or Space to activate a button.

Semantics

Use a label that describes the action. Set type="submit" only for buttons that submit a form. To prevent duplicate requests, manage disabled and the loading state together.

Checklist

  • Give icon-only buttons an aria-label and text buttons a label that describes the action.
  • Enter and Space should activate the button once. Buttons that do not submit a form must not submit it accidentally.
  • Prevent duplicate requests and announce loading in your app. The generating appearance alone does not communicate progress.

For contrast, zoom and screen reader checks, see the common accessibility checklist.