Canopy Screen Reader Alert Message — Best Practices
SkillCommunicationBest practices for the Canopy Screen Reader Alert Message directive. Trigger when notifying screen reader users of dynamic content changes, loading completion, or status updates in an Angular project using Canopy.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Canopy Screen Reader Alert Message — Best Practices skill
What this skill tells your AI
The instructions your AI receives, as published by legal-and-general/canopy in skills/best-practice/sr-alert-message/SKILL.md and read by ahel’s review.
This skill provides usage guidance and input reference for the Canopy lgSrAlertMessage directive (LgSrAlertMessageDirective) from @legal-and-general/canopy.
Apply this skill whenever you use LgSrAlertMessageDirective or lgSrAlertMessage.
Import
import { LgSrAlertMessageDirective } from '@legal-and-general/canopy';
Basic Usage
Apply the directive to a paragraph containing the message for screen readers. Pass a boolean binding: when it becomes true the message is read aloud and then hidden after a timeout.
@if (!loaded) {
<lg-spinner></lg-spinner>
}
<p [lgSrAlertMessage]="loaded">Loading complete</p>
Inputs
| Input | Type | Default | Required | Description |
|---|---|---|---|---|
lgSrAlertMessage | boolean | null | Yes | When true, the message is read by screen readers and hidden after timer ms. |
timer | number | 8000 | No | Time in milliseconds before the message is hidden from screen readers. |
When to Use
Use lgSrAlertMessage whenever content changes dynamically in a way that sighted users notice visually but screen reader users would not detect — for example:
- A spinner disappearing when data finishes loading.
- A success state appearing after a form submission.
Design Constraints
- The
LgSpinnerComponentdocumentation recommends always pairing a spinner withlgSrAlertMessageto announce when loading is complete. - The element carrying the directive is visually hidden at all times; it exists solely for screen readers.
Signals
- GitHub stars
- 23
- Forks
- 46
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
canopy-sr-alert-message- Source
- github.com/legal-and-general/canopy