Skip to content
学習する 測定する ブログ Case studies 概要
このページ内
  • Lighthouse見出しレベルの監査が失敗する原因
  • リソース

見出し要素は番号の降順ではない

Oct 17, 2019 — 更新済み May 7, 2020
Available in: Español, 한국어, Português, Русский, 中文, English
Appears in: アクセシビリティの監査
このページ内
  • Lighthouse見出しレベルの監査が失敗する原因
  • リソース

Screen readers have commands to quickly jump between headings or to specific landmark regions. In fact, a survey of screen reader users found that they most often navigate an unfamiliar page by exploring the headings.

By using correct heading and landmark elements, you can dramatically improve the navigation experience on your site for users of assistive technologies.

Lighthouse見出しレベルの監査が失敗する原因 #

Lighthouseは、見出しが1つ以上のレベルをスキップするページにフラグを設定します。

レベルをスキップする見出しを示すLighthouse監査

たとえば、ページタイトルで<h1>要素を使用し、次にページのメインセクションで<h3>要素を使用すると、<h2>レベルがスキップされるため、監査が失敗します。

<h1>Page title</h1>
<h3>Section heading 1</h3>
…
<h3>Section heading 2</h3>
…
The Lighthouse Accessibility score is a weighted average of all the accessibility audits. See the Lighthouse accessibility scoring post for more information.

構造が適切でない見出しを修正する方法 #

  • すべての見出し要素を、コンテンツの構造を反映する論理的な番号順に従わせます。
  • 見出しのテキストが、関連するセクションの内容を明確に伝えていることを確認します。

例:

<h1>Page title</h1>
<section>
<h2>Section Heading</h2>
…
<h3>Sub-section Heading</h3>
</section>

見出しの構造を確認する方法の1つは、「誰かが見出しだけを使用してページのアウトラインを作成した場合、それは意味があるか」と確認することです。

MicrosoftのAccessibilityInsights拡張機能などのツールを使用して、ページ構造を視覚化し、構造化されてない見出し要素を特定することもできます。

注意

開発者は、目的の視覚スタイルを実現するために見出しレベルをスキップすることがあります。たとえば、<h2>テキストが大きすぎると感じたため、<h3>要素を使用する場合があります。これはアンチパターンと見なされます。代わりに、正しく順序付けられた見出し構造を使用し、必要に応じてCSSを使用して見出しのスタイルを視覚的に設定します。

詳細については、見出しとランドマークの投稿を参照してください。

リソース #

  • 見出しスキップレベル監査のソースコード
  • 見出しレベルは1つだけ増やす (Deque University)
最終更新: May 7, 2020 — 記事を改善する
Return to all articles
共有する
サブスクライブする

Contribute

  • バグを報告する
  • ソースを表示する

関連性のあるコンテンツ

  • developer.chrome.com
  • Chrome のアップデート
  • Web Fundamentals
  • ケーススタディ
  • ポッドキャスト
  • ショー

接続する

  • Twitter
  • YouTube
  • Google Developers
  • Chrome
  • Firebase
  • Google Cloud Platform
  • すべての製品
  • 利用規約とプライバシーポリシー
  • コミュニティガイドライン

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies.