alt-text
できること
このスキルは、ページのすべての画像に、その目的を説明する代替テキストがあるかを確認します。スクリーンリーダーの利用者と検索エンジンに、画像を理解してもらいたいWebチーム向けです。
使う場面
- ✓Webページやテンプレートに画像を追加するとき。
- ✓画像の代替テキストがファイル名になっているか、代替テキストがまったくないとき。
- ✓基本的なアクセシビリティの観点でページをレビューしているとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/alt-text/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のホームページのすべての画像を確認し、不足している、または曖昧な代替テキストは、より良いものに書き直してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは各画像の要素をスキャンし、不足している、または一般的すぎるalt値に印を付け、その画像がページ上で持つ意味に基づいて説明文を書きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Provide meaningful alt text for images
Approximately 2.2 billion people worldwide have vision impairment. Screen readers read the alt attribute aloud—without meaningful alt text, users who are blind receive no information about image content. Missing alt text also fails WCAG 2.1 Success Criterion 1.1.1, which is a Level A (minimum) requirement. Search engines also rely on alt text to index image content.
Quick Reference
- Every
<img>must have analtattribute—omitting it entirely violates WCAG 2.1 SC 1.1.1 - Decorative images use
alt=""so screen readers ignore them - Alt text should describe the image's purpose, not just its appearance
- Linked images: alt describes the link destination, not the visual
Check
Scan all <img> elements in the codebase. Verify: 1) Every <img> has an alt attribute (missing alt is an error). 2) Decorative images use alt="". 3) Informative images have descriptive text that conveys the image's meaning—not just its file name. 4) Images that are links describe the destination. 5) Images of text reproduce the text in alt. Flag any <img> without alt, with alt matching the filename (e.g., alt="photo1.jpg"), or with generic values like alt="image" or alt="photo".
Fix
For each image missing or with poor alt text: 1) Informative images—describe what the image conveys, not just what it shows (e.g., alt="Bar chart showing 40% increase in sales Q3 2024" not alt="chart"). 2) Decorative images—add alt="" so screen readers skip them. 3) Linked images—describe the link destination (e.g., alt="Visit our Twitter profile"). 4) Images of text—copy the text verbatim into alt. 5) Complex images (charts, infographics)—provide a short alt plus a longer description via aria-describedby or a visible caption.
Explain
Explain WCAG 2.1 Success Criterion 1.1.1 Non-text Content: every image must have a text alternative. Screen readers announce the alt attribute aloud—without it, users who are blind or have low vision cannot understand the page. Bad alt text (like alt="image") is no better than no alt text. Decorative images must use alt="" explicitly so screen readers skip them entirely—omitting alt causes some screen readers to announce the filename.
Code Review
Review image assets, markup, and delivery configuration related to Provide meaningful alt text for images. Flag exact files or components where format choice, sizing, or loading behavior violates the rule, and describe how to confirm the fix in DevTools.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/images/alt-text
よくある質問
装飾的な画像にも代替テキストは必要ですか?
いいえ。装飾的な画像には空のalt値を使い、スクリーンリーダーが読み飛ばすようにすべきだと、このスキルは説明しています。
代替テキストは、なぜ検索にとって重要ですか?
検索エンジンも、画像の内容を理解するために代替テキストを使うと、このスキルは説明しています。
photo1.jpgのような代替テキストの何が問題ですか?
画像の意味ではなくファイル名を示しているため、スクリーンリーダーの利用者の役に立たないためです。
詳細
作者による元の説明
Use when reviewing image assets, markup, and CDN or build transforms related to Provide meaningful alt text for images. Check encoded size, rendered size, loading strategy, and above-the-fold impact together.
人気
- GitHubのスター
- 75k
- ランキング
- #2718
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。