Skip to content

Document button loading announcements in component docs #7881

@iansan5653

Description

@iansan5653

The documentation for buttons mentions the loading feature with minimal description:

Use the loading prop to show a spinner inside the Button while an action is in progress. It also sets aria-disabled and preserves focus automatically. See Button loading state for accessibility details.

The linked documentation encourages consumers to implement aria-live loading messages:

Include a visually hidden, ARIA live region (using aria-live="polite") message like "Saving profile" to communicate status. The live region must be present on page load, but the message inside the live region should only be rendered while the Button is in a loading state.

However, Button already renders a "Loading" announcement by default, and this announcement is customizable with the loadingAnnouncement prop. The documentation fails to mention this, which can encourage consumers to write their own implementation, resulting in double announcements.

The documentation for Button and IconButton should be updated to detail this loading announcement functionality.

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions