miCheckerの記事は休憩して、新しいホワイトハウスのサイトがとても素晴らしいので紹介します。
The White House
アクセシビリティステートメントも素晴らしいです。
Accessibility Statement
確実にアクセシビリティを実践しています。ソースコードを見て欲しいのですが、いたるところに class="screen-reader-text" というクラスを見つけることができます。ご想像どおり、これは、音声ブラウザの利用者向けのテキストであることを示します。aria-labelledby も活用していますし、ステートメントは嘘ではないことがよくわかります。
アーカイブで昨年11月頃のサイトも確認しましたが、雲泥の差がありました・・・。
さて、クラス screen-reader-text を見てみたいと思います。とても参考になると思います。今度、お客様に隠しテキストの例を紹介するときは、これを紹介しようと思うくらいです。 (少しいじっています)
/*--------------------------------------------------------------
--------------------------------------------------------------*/
/* Text meant only for screen readers. */
.screen-reader-text:not(:focus):not(:active) {
clip: rect(1px, 1px, 1px, 1px);
position: absolute !important;
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
/* Text meant only for screen readers. */
.screen-reader-text:not(:focus):not(:active) {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}
/*--------------------------------------------------------------
# Accessibility
--------------------------------------------------------------*/
/* Text meant only for screen readers. */
.screen-reader-text:not(:focus):not(:active) {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important; /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}
.screen-reader-text:focus {
box-shadow: 0 0 2px 2px #000;
.screen-reader-text:focus {
background-color: #000;
border-radius: 3px;
box-shadow: 0 0 2px 2px #000;
clip: auto !important;
-webkit-clip-path: none;
clip-path: none;
color: #fff;
display: block;
font-size: .875rem;
font-weight: 700;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000
}
.screen-reader-text:focus {
background-color: #000;
border-radius: 3px;
box-shadow: 0 0 2px 2px #000;
clip: auto !important;
-webkit-clip-path: none;
clip-path: none;
color: #fff;
display: block;
font-size: .875rem;
font-weight: 700;
height: auto;
left: 5px;
line-height: normal;
padding: 15px 23px 14px;
text-decoration: none;
top: 5px;
width: auto;
z-index: 100000
}
SNS関係のアイコンの処理も素敵です。別ウィンドウで開くことも書かれています。
<span class="screen-reader-text">Facebook<span class="screen-reader-text">Opens in a new window</span></span>
<span class="screen-reader-text">Facebook<span class="screen-reader-text">Opens in a new window</span></span>
<span class="screen-reader-text">Facebook<span class="screen-reader-text">Opens in a new window</span></span>
アクセシビリティ機能としては、コントラストを変更する Toggle High Contrast という機能と、テキストサイズを拡大する Toggle Large Font Size もページ左側の使いやすいところに配置されています。コントラスト変更ボタンはとても助かりますし、テキスト拡大も、テキストだけの拡大はブラウザでは面倒になっていますので、こうした独立ボタンはとても有用だと思います。
動画をまだ見つけることができていないので、見つけたら、どのような具合かレポートさせていただきます。