fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

[Feature]: useAnnounce - Support configurable announcement delay

Open spenoff opened this issue 7 months ago • 1 comments

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

The v8 Announced component rendered a visually-hidden

with aria-live, and consumers could implement their own delay logic before updating the message prop. The v9 useAnnounce hook fires the announcement immediately when announce() is called, with no built-in way to debounce or delay.

Use case: Delays are important for:

  • Debouncing rapid state changes (e.g., typing in a search box with live results)
  • Ensuring visual UI has updated before the announcement fires
  • Preventing announcement interruptions during animations/transitions

Proposed solution: Add an optional delay parameter (in ms) to the useAnnounce hook or announce() function.

Additional context

No response

Have you discussed this feature with our team

No response

Validations

  • [x] Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

Medium

spenoff avatar Apr 12 '26 05:04 spenoff

v9's useAnnounce is intentionally minimal — debouncing is the caller's responsibility so each consumer can pick the right strategy (lodash debounce, useCallback + useRef, etc.). Closing as By Design.

tudorpopams avatar Apr 20 '26 15:04 tudorpopams