Canopy Screen Reader Alert Message — Best Practices

SkillCommunication

Best 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.

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

InputTypeDefaultRequiredDescription
lgSrAlertMessagebooleannullYesWhen true, the message is read by screen readers and hidden after timer ms.
timernumber8000NoTime 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 LgSpinnerComponent documentation recommends always pairing a spinner with lgSrAlertMessage to 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