Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

アクセシビリティ向上のための Skip Links の設定

(注)これは以前のサイトに関する記事です。現在は、Wordpressを使っています。

このサイトは、Drupal のZenというテーマをカスタマイズして使っています。前から気になっていて放置していたのですが、Zenテーマを使うとデフォルトで、”Skip to Navigation” というタイトルのリンクができてしかも通常は隠されているのです。

場所は <body> のすぐ後で、こんな感じ。


<body>
     <p id="skip-link">
      <a href="#main-menu" class="element-invisible element-focusable">Skip to navigation</a>
    </p>
    ......

これは一体何なのか、ということをちょっと調べてみました。

これはアクセシビリティに関する機能で、スクリーンリーダーを使ってアクセスする時にすぐにメインのコンテンツにジャンプできるようにするためのリンクなのだそうです。

Drupalのサイトにもドキュメントがあります。

https://drupal.org/node/467976

Skip Linkは複数個設置してもよく、常に隠してもいいし、フォーカスが当たった時だけ表示するようにしてもよいようです。

Skip Linkのデフォルトのジャンプ先は #main-menu というid で、これはナビゲーションメニューに付加されたタグです。ナビゲーションメニューはヘッダのすぐ下の横一列のメニューです。

用途からするとメインコンテンツの先頭の方がいいのではないかと思って探してみると、ちゃんとパンくずリストの直後、タイトルの直前のところにタグがセットしてありました。

こういうやつ。


<nav class="breadcrumb" ... >
<a id="main-content"></a>
<h1 class="title" ...> コンテンツのタイトル </h1>

そこで、Skip Linkのタイトルを”Skip to content”に変え、#main-content のジャンプするようにしました。

また、左上の”このサイト”にジャンプするリンクも作っておきました。

アクセシビリティってこれまで気にしてなかったのですが、ちょっと勉強してみようかと思います。

PAGE TOP