Skip to content

Button

What component has

Keyboard support

Keyboard support
KeyFunction
TabMoves focus to the next focusable element.
Shift + TabMoves focus to the previous focusable element.
Enter, SpaceActivates the button.

Attributes

The list below describes attributes that component already has.

Attributes
AttributeUsage
aria-busy="true"Applies to button with loading prop. Indicates that button is being modified and that assistive technologies may want to wait until the changes are complete before informing the user about the update.
aria-disabled="true"Applies to button with disabled prop. Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

Considerations for developers

Roles and attributes

The list below will help you to keep in mind the necessary roles and attributes to make our components fully accessible in the particular cases in your interfaces.

Attributes
Component / elementAttributeUsage
buttonaria-labelDefines a string value that labels an interactive element. It is a required for buttons without visible text content.
buttonaria-labelledbyThe aria-labelledby attribute identifies the element (or elements) that labels the element it is applied to. It is required for buttons without visible text content.

Resources

Other recommendations

See more accessibility recommendations in the common Accessibility guide.

Released under the MIT License.

Released under the MIT License.