microsoft / microsoft/fluentui

[Feature]: Ability to override or disable announce message in MessageBar component

Open
#36,291 3 comments 0 reactions 1 assignee View on GitHub

@smhigley is already working on this.

Since Jun 10, 2026.

Area: Accessibility Component: MessageBar Fluent UI react-components (v9) Type: Feature
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

Currently the message bar component does not allow aria-live to be off. While it does accept a politeness prop, it only allows polite or assertive. I am using the message bar component to display information that needs to be called out on the page; however, the current implementation is causing it to announce at top level. This caused issues during the external a11y usability study as it clogged up the screenreader announcements. It was suggested we allow the content to be read inline.

So basically, I would like to use the message bar as an actual message bar and not an alert. Looking through the Fluent useMessageBar.js runtime code, it calls announce regardless:

announce(message, {
            polite: computedPoliteness === 'polite',
            alert: computedPoliteness === 'assertive'
        });

Right now, the only way to solve this would be to completely recreate the message bar component. One of the suggestions from the teams channel thread was to add a prop that allowed overriding the announce string. I am also open to just allowing off as an accepted value to the aria-live prop.

Additional context

No response

Have you discussed this feature with our team

No response

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

High

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.