astro-accessibility
1
总安装量
1
周安装量
#50998
全站排名
安装命令
npx skills add https://github.com/jhb-software/payload-astro-website-template --skill astro-accessibility
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
github-copilot
1
gemini-cli
1
Skill 文档
Accessibility Rules (WCAG 2.1 AA)
This project must meet WCAG 2.1 AA guidelines.
Semantic Structure
- Use semantic HTML:
<header>,<nav>,<section>,<article>,<footer>,<ul>,<li> - Use ARIA roles only when native semantics are not possible (e.g.
<div role="list">)
Images
- Informative images: use the custom
<Img>component and pass themediaprop, it includes the correct alt text - Functional images/icons (used in buttons or links): use
altoraria-labelto describe the action/purpose - Decorative images/icons: use
aria-hidden="true"andalt=""
Active State
- Use
aria-current="page"oraria-current="location"for the current page (e.g. navigation, breadcrumbs) - Use aria-current for styling:
aria-current:font-semibold
Lists
- Use semantic HTML:
<ul>,<ol>,<li> - For custom components rendering lists, explicitly set ARIA roles:
role="list"on the containerrole="listitem"on each item
Keyboard Navigation
- All functionality must be operable using only the keyboard
- Do not rely solely on hover, drag, or pointer events for core interactions
Aria Labels
- Do NOT hardcode strings for
aria-labelor visually hidden (sr-only) text - Always use dynamic labels from the global state:
labels.global['skipToMainContent'] - Select elements must have an accessible name (e.g.
labeltag oraria-label)