The Button component is designed to handle accessibility out of the box: it uses the correct roles, keyboard event handling, and ARIA attributes for both native <button> and custom elements. Disabled states are communicated to assistive technology, and keyboard users can activate custom buttons using Space or Enter.
However, some responsibilities remain for you as a developer:
Icon-only buttons: Always provide an accessible label using text or aria-label so screen readers can announce their purpose.
Color contrast: Ensure text and icon color has sufficient contrast with the background in all states (WCAG 2.1: Contrast (Minimum)).
Focus indicator: All buttons must have a visible focus indicator for keyboard users. Do not remove focus outlines unless you provide a visible alternative.
Button states indicate the current condition of the button. Buttons can have an active appearance (by adding the active class) or a disabled appearance (by adding the disabled class).
Use the active prop to show the button's active style. Note that buttons indicating
UI state (info, success, warning, and error) as well as glass and outline buttons do not have active states.