landmark-one-main
できること
このスキルは、各ページに主要コンテンツのmainランドマークが1つだけあるかを確認します。ページのレイアウトやテンプレートを作る開発者向けです。
使う場面
- ✓ページにmain要素が2つ以上あるとき。
- ✓テンプレートが誤って本文を2つ目のmain領域で囲んでいるとき。
- ✓スクリーンリーダーの利用者が本文に直接移動できないとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/landmark-one-main/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のページにmain領域がちょうど1つあるか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、main要素とmainロールを持つ要素を数えます。余分なmain領域は1つにまとめるか、余分なコンテナーからロールを外すよう提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use exactly one main landmark
A single main landmark allows keyboard and screen reader users to jump directly to the primary content of the page, bypassing repetitive navigation.
Quick Reference
- Ensure each page has exactly one
<main>element - Avoid multiple elements with
role='main' - Provides a clear starting point for the page's primary content
Check
Count the number of <main> elements or elements with role='main' on the page to ensure there is exactly one.
Fix
Combine multiple main content areas into a single <main> element or remove the 'role=main' attribute from extra containers.
Explain
Explain how the main landmark acts as a primary navigation target for assistive technologies, and why multiple main areas cause confusion.
Code Review
Review the rendered markup and interactive states that affect Use exactly one main landmark. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/landmark-one-main
よくある質問
mainランドマークは何をしますか?
支援技術に、ページの主要なコンテンツの明確な出発点を提供します。
main領域が複数あると何が問題ですか?
このスキルによると、ランドマークで移動する利用者を混乱させます。
結果はどのように確認できますか?
このスキルは、ブラウザーのアクセシビリティツールや支援技術の利用を勧めています。
詳細
作者による元の説明
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Use exactly one main landmark. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
人気
- GitHubのスター
- 75k
- ランキング
- #2911
- ライセンス
- 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 において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。