バリアフリーランドマーク

Nov 27 2022
WCAG 2.4。

WCAG 2.4.1 バイパス ブロックの達成基準は、スクリーン リーダーなどの支援技術により、ユーザーがランドマークをナビゲートして、複数の Web ページで繰り返されるコンテンツのブロックをバイパスできるようにする必要があることを示しています。

HTML 構造を意味的に正確かつ正確に定義することが不可欠です。ランドマークは、ユーザーが支援技術を使用してページのコンテンツをナビゲートする際に、抽象的かつ重要な役割を果たします。ページのセクションをプログラムで識別し、ユーザーがより意味のある方法でコンテンツを認識できるようにします。

重要なのは、ページの論理構造を特定し、適切なランドマーク ロールまたは HTML5 定義の要素を使用して、意味的に有効なページを構築することです。

ほぼすべてのページに標準的な構造があります: headermainnavigationregionfooterおよびaside

<header>はページのバナーを識別し、通常は上部に配置されます。主に、検索、ブランド ロゴ、およびメイン ナビゲーションが含まれています。理想的には、各ページにバナー ランドマークを 1 つだけ含める必要があります。

Using the HTML5 element

<header>
  <div>
    company logo..brand name
  </div>
  <nav>
    main navigation of the website
  </nav>
</header>

Using the Aria Technique

<div role=“header”>
    company logo.. brand name or navigation 
</div>

Using the HTML5 element

<main>
  <h1> main heading for the page </h1>
  <div> main content goes here </div>
</main>

Using the Aria Technique

<div role=“main”>
  <h1> main heading of the page </h1>

   ........main content goes here.......

</div>

Using the HTML5 element 

<nav id="primary-nav" aria-label="primary navigation">
  <ul>
    <li><a href="page-link-1">page link 1</a></li>
    <li><a href="page-link-2">page link 2</a></li>
    <li><a href="page-link-3">page link 3</a></li>
    <li><a href="page-link-4">page link 4</a></li>
  </ul>
</nav>

More than one <nav> tag in the same page

<nav aria-labelledby="pagination-nav">
  <h2 id="pagination-nav">heading content</h2>
  <ul>
    <li><a href="page-link-1">page link 1</a></li>
    <li><a href="page-link-2">page link 2</a></li>
    <li><a href="page-link-3">page link 3</a></li>
  </ul>
</nav>

Using the Aria Technique

<div role="navigation">
  <ul>
    <li><a href="page-link-1">page link 1</a></li>
    <li><a href="page-link-2">page link 2</a></li>
    <li><a href="page-link-3">page link 3</a></li>
  </ul>
</div>

HTML structure

<header>
  <a href="#main" id="skip-links" class="offscreen">
    skip to main
  </a>
</header>
<main id="main"></main>
CSS

.offscreen{
    position: absolute;
    left: -999px;
    width: 1px;
    height: 1px;
    top: auto;
    overflow: hidden;

  &:focus {
    position: static;
    margin: auto;
    width: auto;
    height: auto;
    }
}


Using the HTML5 element

<section aria-labelledby="heading_id">
  <h2 id="heading_id"> heading goes here</h2>
  .....region content goes here.....
</section>

Using the Aria Technique 

<div role="region" aria-labelledby="heading_id">
  <h2 id="heading_id"> heading goes here</h2>
   .........region content goes here.........
</div>


Using the HTML5 element

<footer>
  <p>......footer content goes here....</p>
  <ul>
    <li><a href="page_link_1.html">page link 1</a></li>
    <li><a href="page_link_2.html">page link 2</a></li>
  </ul>
</footer>

Using the Aria Technique 

<div role="contentinfo">
  <p>......footer content goes here......</p>
</div>


Using the HTML5 element 

<aside aria-labelledby="heading_id">
  <h2 id="heading_id">.......heading content goes here....</h2>
  ........region content goes here.......
</aside>


Using the Aria Technique 

<div role="complementary" aria-labelledby="heading_id">
  <h2 id="heading_id">heading content goes here</h2>
  ......region content goes here......
</div>

JAWS
Insert + Control + R => ランドマークのリスト
Q => メインランドマークに
R => 次のランドマークに
移動 shift+ R => 前のランドマークに移動

NVDA
Insert + F7 => ランドマークのリスト
D => メインに移動ランドマーク
Shift + D => 前のランドマークに移動

ナレーション
Ctrl + Option + U => ランドマークのリスト
W => 次のランドマークに移動
Shift + W => 前のランドマークに移動