Skip to content

fix(a11y): name NotificationPanel drawer and announce new items - #568

Merged
sm1990 merged 7 commits into
wso2:mainfrom
ajirthan:fix/a11y-notification-panel-560
Jul 27, 2026
Merged

fix(a11y): name NotificationPanel drawer and announce new items#568
sm1990 merged 7 commits into
wso2:mainfrom
ajirthan:fix/a11y-notification-panel-560

Conversation

@ajirthan

@ajirthan ajirthan commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Purpose

Name the NotificationPanel drawer for assistive tech and add a polite live region for consumer-published status updates (WCAG 4.1.2 / 4.1.3).

  • Default drawer aria-label="Notifications" (overridable; empty/whitespace falls back)
  • Consumer-driven announcements via liveAnnouncement / setLiveAnnouncement (list child-count is not auto-announced)
  • Publishes only while open; clear when prop becomes undefined; do not re-announce unchanged prop on reopen
  • Regression tests, LiveAnnouncements Storybook story, and accessibility docs updates

Related Issues

Related PRs

  • N/A

Checklist

  • Followed the CONTRIBUTING guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (packages/oxygen-ui-docs/ACCESSIBILITY.md, NotificationPanel + Accessibility stories)
  • Unit tests provided. (packages/oxygen-ui/src/components/accessibility.test.tsx)
  • Storybook stories updated/added (if applicable)

Security checks

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

NotificationPanel now defaults and supports overriding the drawer’s accessible name. It adds consumer-controlled polite live-region announcements through the liveAnnouncement prop and useNotificationPanel().setLiveAnnouncement, including lifecycle handling for opening, closing, repeated messages, and persistent panels. The notification list documentation clarifies that child-count changes are not announced automatically. Accessibility tests, Storybook documentation, a live-announcement example, and audit documentation were updated accordingly.

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant NotificationPanel
  participant Context
  participant PoliteLiveRegion
  Consumer->>NotificationPanel: Provide liveAnnouncement
  NotificationPanel->>Context: Expose open and setLiveAnnouncement
  NotificationPanel->>PoliteLiveRegion: Render announcement while open
  Consumer->>Context: Call setLiveAnnouncement(message)
  Context->>NotificationPanel: Publish message
  NotificationPanel->>PoliteLiveRegion: Remount updated status text
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses #560 with a drawer label, consumer-published live announcements, and matching docs/tests/story updates.
Out of Scope Changes check ✅ Passed The changes stay focused on NotificationPanel accessibility, docs, tests, and Storybook; no unrelated code changes are evident.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title matches the main change: NotificationPanel accessibility naming and announcement behavior.
Description check ✅ Passed The description follows the template and covers purpose, issues, checklist, tests, docs, stories, and security checks.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ajirthan
ajirthan requested a review from sm1990 July 24, 2026 05:50
@sm1990
sm1990 merged commit 7c2bf64 into wso2:main Jul 27, 2026
7 checks passed
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.

A11y: NotificationPanel live-region announcements and drawer labeling

2 participants