Accessibility

From Legal-and-General/canopy · View interactive version

Accessibility is an AI agent skill from the GitHub repository Legal-and-General/canopy. Accessibility guidance for Canopy applications. Trigger when implementing accessible HTML, ARIA attributes, keyboard navigation, skip links, screen reader support, or form accessibility in an Angular project using Canopy.

How to use this skill

Skill file

Canopy Accessibility — Best Practices

This skill provides developer-focused accessibility guidance for applications built with Canopy.

Apply this skill when implementing any HTML structure, forms, navigation, or dynamic content.

All Canopy components are built to be accessible. This skill covers what you need to do in your application code beyond using Canopy components.


Document Language

Always declare the page language so assistive technologies use the correct voice profile:

<html lang="en">

For inline language switches:

<p>You could have <i lang="it">una frase in italiano</i></p>

Skip to Main Content

Provide a skip link so keyboard users can bypass repeated header/nav content. Use the skip-content CSS class:

<a href="#main" class="skip-content">Skip to main content</a>
...
<main id="main">...</main>

lg-page automatically provides this link — you do not need to add it manually when using the Page component.


Images

<img src="chart.png" alt="Bar chart showing quarterly revenue growth" />
<img src="decorative-divider.png" alt="" />

Videos and Audio

Provide a transcript for all video and audio content. Use the Canopy lg-details component to house the transcript in a collapsible section. Add captions for videos (transcript synchronised with audio).


Tables

Use the Canopy lg-table component — it follows these standards automatically.


Forms

Canopy form components handle label association and grouping automatically.


Hiding Content

| Goal | Method |

|------|--------|

| Hide from all users | visibility: hidden or display: none |

| Hide from screen readers only | aria-hidden="true" |

| Show to screen readers only | class="lg-visually-hidden" |

<lg-icon name="arrow-right" aria-hidden="true"></lg-icon>
<span class="lg-visually-hidden">opens in a new tab</span>

Landmark Regions

Use HTML5 semantic elements and ARIA roles to help screen reader users navigate:

<header role="banner">
  <nav role="navigation">...</nav>
</header>
<main role="main">...</main>
<footer role="contentinfo">...</footer>

Accessibility Checklist

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.