Button
A button is a widget that enables users to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
— Button Pattern, WAI ARIA Authoring Practices Guide (APG)
§ Notes
Missing.css uses the <button>
element for buttons.
Buttons can be one of the following types:
- Ordinary button
- The basic button can trigger an action or event.
- Toggle button
- A two-state button that can be either off (not pressed) or on (pressed).
State is determined by the
aria-pressed
attribute. - Menu button
- A button that reveals a hidden menu.
Any of the above buttons can also be disabled using the disabled
attribute.
Keyboard Interaction
- Enter : Activate the button (when focused).
- Space : Activate the button (when focused).