Skip to content

fix(z-toast-notification): add ARIA live region for status messages#628

Open
ada-workbackai wants to merge 1 commit intomasterfrom
workbackai/fix/wcag-4.1.3-toast-status-message
Open

fix(z-toast-notification): add ARIA live region for status messages#628
ada-workbackai wants to merge 1 commit intomasterfrom
workbackai/fix/wcag-4.1.3-toast-status-message

Conversation

@ada-workbackai
Copy link
Copy Markdown
Contributor

Summary

Fixes WCAG 4.1.3 (Status Messages) by adding ARIA live region attributes to the z-toast-notification component.

Issue: The email verification toast notification displayed after registration uses a custom <z-toast-notification> web component that lacks ARIA live region properties. The message appears dynamically but is not programmatically determinable as a status message, preventing screen readers from announcing it.

Solution: Added role="status", aria-live="polite", and aria-atomic="true" attributes to the Host element in the toast notification component.

Changes

  • File: src/components/z-toast-notification/index.tsx
  • Added attributes:
    • role="status" - Identifies the element as a status message
    • aria-live="polite" - Announces changes when the user is idle
    • aria-atomic="true" - Announces the entire message as a single unit

Test Plan

  • Followed registration user flow to reproduce the toast notification
  • Confirmed the toast element lacked ARIA attributes before the fix
  • Added ARIA live region attributes to the component
  • Built the component successfully with Stencil
  • Verified the fix compiles without errors

Evidence

View before/after screenshots and full audit details:
https://app.workback.ai/dashboard/issue/5034/


WCAG Reference:
4.1.3 Status Messages (Level AA)

Adds role="status", aria-live="polite", and aria-atomic="true" to
the toast notification component to ensure dynamic status messages are
announced to screen readers.

This fixes WCAG 4.1.3 (Status Messages) Level AA violations where toast
notifications appeared dynamically but were not programmatically
determinable as status messages.
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.

1 participant