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.
The documentation for buttons mentions the
loadingfeature with minimal description:The linked documentation encourages consumers to implement
aria-liveloading messages:However,
Buttonalready renders a "Loading" announcement by default, and this announcement is customizable with theloadingAnnouncementprop. The documentation fails to mention this, which can encourage consumers to write their own implementation, resulting in double announcements.The documentation for
ButtonandIconButtonshould be updated to detail this loading announcement functionality.