ECHOES-1341 Add alert and status announcement modes to Banner#700
Conversation
✅ Deploy Preview for echoes-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
5706215 to
465d604
Compare
There was a problem hiding this comment.
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
BannerAnnouncementModeand anannouncementModeprop that maps directly to the banner’s ARIArole(defaulting toalert). - Re-exported
BannerAnnouncementModethrough the layout public API barrels. - Added a Storybook example (
PageLevelStatus) and a unit test covering thestatusrole 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.
465d604 to
2ea6db5
Compare
|
Code Review ✅ ApprovedIntegrates OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |




Summary by Gitar
announcementModeprop toBanner,MessageCallout, andMessageInlineto supportalertandstatusARIA roles.LiveRegionAnnouncementModeenum and exported it throughlayoutand index packages.PageLevelStatusstory inBanner-stories.tsxto demonstrate thestatusmode.Banner-test.tsx,MessageCallout-test.tsx, andMessageInline-test.tsxto verify correct ARIA role application.message_callout.dismissinkeys.json.This will update automatically on new commits.