Skip to content

ECHOES-1341 Add alert and status announcement modes to Banner#700

Merged
david-cho-lerat-sonarsource merged 2 commits into
mainfrom
ECHOES-1341-add-alert-and-status-announcement-modes-to-banner
Jun 11, 2026
Merged

ECHOES-1341 Add alert and status announcement modes to Banner#700
david-cho-lerat-sonarsource merged 2 commits into
mainfrom
ECHOES-1341-add-alert-and-status-announcement-modes-to-banner

Conversation

@david-cho-lerat-sonarsource

@david-cho-lerat-sonarsource david-cho-lerat-sonarsource commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary by Gitar

  • New features:
    • Added announcementMode prop to Banner, MessageCallout, and MessageInline to support alert and status ARIA roles.
    • Implemented LiveRegionAnnouncementMode enum and exported it through layout and index packages.
  • Documentation:
    • Added PageLevelStatus story in Banner-stories.tsx to demonstrate the status mode.
  • Testing:
    • Added unit tests in Banner-test.tsx, MessageCallout-test.tsx, and MessageInline-test.tsx to verify correct ARIA role application.
  • Refactor:
    • Corrected an incorrect i18n description key for message_callout.dismiss in keys.json.

This will update automatically on new commits.

@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for echoes-react ready!

Name Link
🔨 Latest commit 87a0947
🔍 Latest deploy log https://app.netlify.com/projects/echoes-react/deploys/6a2abda1622f390008a92ce5
😎 Deploy Preview https://deploy-preview-700--echoes-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jun 11, 2026

Copy link
Copy Markdown

ECHOES-1341

@david-cho-lerat-sonarsource david-cho-lerat-sonarsource force-pushed the ECHOES-1341-add-alert-and-status-announcement-modes-to-banner branch 2 times, most recently from 5706215 to 465d604 Compare June 11, 2026 08:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an explicit accessibility option to Layout.Banner so consumers can choose whether the banner is announced as an assertive alert (current behavior) or a polite status (for page-level status updates), along with Storybook and unit test updates.

Changes:

  • Introduced BannerAnnouncementMode and an announcementMode prop that maps directly to the banner’s ARIA role (defaulting to alert).
  • Re-exported BannerAnnouncementMode through the layout public API barrels.
  • Added a Storybook example (PageLevelStatus) and a unit test covering the status role behavior (plus snapshot key update due to test rename).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
stories/layout/Banner-stories.tsx Adds announcementMode control + PageLevelStatus story demonstrating status announcements.
src/components/layout/index.ts Re-exports BannerAnnouncementMode from the layout package entry point.
src/components/layout/banner/index.ts Re-exports BannerAnnouncementMode from the banner barrel.
src/components/layout/banner/BannerTypes.tsx Defines BannerAnnouncementMode and adds announcementMode to BannerProps with documentation.
src/components/layout/banner/Banner.tsx Applies announcementMode to the rendered wrapper’s role (default alert).
src/components/layout/banner/tests/Banner-test.tsx Adds a status-mode test and clarifies default alert behavior in the first test name.
src/components/layout/banner/tests/snapshots/Banner-test.tsx.snap Updates snapshot key to match renamed test.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

@gregaubert gregaubert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@david-cho-lerat-sonarsource david-cho-lerat-sonarsource force-pushed the ECHOES-1341-add-alert-and-status-announcement-modes-to-banner branch from 465d604 to 2ea6db5 Compare June 11, 2026 13:29
@david-cho-lerat-sonarsource david-cho-lerat-sonarsource changed the base branch from david/ECHOES-1337-1338-align-toast-lifecycle-with-guidelines to main June 11, 2026 13:29
@sonarqube-next

Copy link
Copy Markdown

@david-cho-lerat-sonarsource david-cho-lerat-sonarsource merged commit 6dc2755 into main Jun 11, 2026
9 checks passed
@david-cho-lerat-sonarsource david-cho-lerat-sonarsource deleted the ECHOES-1341-add-alert-and-status-announcement-modes-to-banner branch June 11, 2026 13:56
@gitar-bot

gitar-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Integrates announcementMode into Banner, MessageCallout, and MessageInline components to support alert and status ARIA roles. The update includes new storybook examples, unit tests, and a fix for an incorrect i18n key in keys.json.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants