21
21
</form >
22
22
```
23
23
24
- <common-codepen-snippet title =" Simple Form " slug =" YzwpPYZ " :height =" 368 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
24
+ <common-codepen-snippet title =" Simple Form " slug =" dyNzzWZ " :height =" 368 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
25
25
26
26
どのように ` autocomplete='on' ` をフォーム要素上に含むことができるかに注目してください。そしてそれはフォーム内の全ての入力欄に適用されます。また各入力欄の [ autocomplete 属性に対して異なる値] ( https://developer.mozilla.org/ja/docs/Web/HTML/Attributes/autocomplete ) をセットすることもできます。
27
27
34
34
<input type =" text" name =" name" id =" name" v-model =" name" />
35
35
```
36
36
37
- <common-codepen-snippet title =" Form Label " slug =" wvMrGqz " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
37
+ <common-codepen-snippet title =" Form Label " slug =" XWpaaaj " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
38
38
39
39
chrome デベロッパツールでこの要素を検証し、Elements タブ内の Accessibility タブを開くと、どのように入力欄がその名前をラベルから取得するかを確認できます:
40
40
@@ -68,15 +68,15 @@ chrome デベロッパツールでこの要素を検証し、Elements タブ内
68
68
/>
69
69
```
70
70
71
- <common-codepen-snippet title =" Form ARIA label " slug =" jOWGqgz " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
71
+ <common-codepen-snippet title =" Form ARIA label " slug =" NWdvvYQ " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
72
72
73
73
この要素を Chrome DevTools で自由に検証し、どのようにアクセス可能な名前が変更されたか確認してください:
74
74
75
75
![ aria-label からアクセス可能な入力欄の名前を表示する Chrome デベロッパツール] ( /images/AccessibleARIAlabelDevTools.png )
76
76
77
77
#### aria-labelledby
78
78
79
- [ ` aria-labelledby ` ] ( https://developer.mozilla.org/ja/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute ) は ` aria-label ` に類似しており、ラベルテキストが画面に表示されている場合に使用されることを期待します 。これは ` id ` によって他の要素とペアになっており、複数の ` id ` を関連付けることができます:
79
+ [ ` aria-labelledby ` ] ( https://developer.mozilla.org/ja/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-labelledby_attribute ) の使用法は、ラベルテキストが画面に表示されている場合に使用されることを除けば、 ` aria-label ` に似ています 。これは ` id ` によって他の要素とペアになっており、複数の ` id ` を関連付けることができます:
80
80
81
81
``` html
82
82
<form
@@ -100,13 +100,13 @@ chrome デベロッパツールでこの要素を検証し、Elements タブ内
100
100
</form >
101
101
```
102
102
103
- <common-codepen-snippet title =" Form ARIA labelledby " slug =" ZEQXOLP " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
103
+ <common-codepen-snippet title =" Form ARIA labelledby " slug =" MWJvvBe " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
104
104
105
105
![ aria-labelledby からアクセス可能な入力欄の名前を表示する Chrome デベロッパツール] ( /images/AccessibleARIAlabelledbyDevTools.png )
106
106
107
107
#### aria-describedby
108
108
109
- [ aria-describedby] ( https://developer.mozilla.org/ja/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute ) は ` aria-labelledby ` と同じ方法で使用され、ユーザが必要とする可能性のある追加情報と説明を提供します 。これは任意の入力欄の基準を説明するために使用することができます:
109
+ [ aria-describedby] ( https://developer.mozilla.org/ja/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute ) は、ユーザが必要とする可能性のある追加情報と説明を提供することを除けば、 ` aria-labelledby ` と同じ方法で使用されます 。これは任意の入力欄の基準を説明するために使用することができます:
110
110
111
111
``` html
112
112
<form
@@ -132,7 +132,7 @@ chrome デベロッパツールでこの要素を検証し、Elements タブ内
132
132
</form >
133
133
```
134
134
135
- <common-codepen-snippet title =" Form ARIA describedby " slug =" JjGrKyY " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
135
+ <common-codepen-snippet title =" Form ARIA describedby " slug =" gOgxxQE " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
136
136
137
137
Chrome DevTools で検出することで Description を確認することができます:
138
138
@@ -144,7 +144,7 @@ Chrome DevTools で検出することで Description を確認することがで
144
144
145
145
プレースホルダによる問題の1つは初期状態で [ color contrast criteria] ( https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html ) を満たしていないことです。色のコントラストを修正するとプレースホルダが入力欄に事前入力されたデータのように見えます。以下の例を見ると、color contrast criteria を満たしている Last Name プレースホルダが事前入力されたデータのように見えることが確認できます:
146
146
147
- <common-codepen-snippet title =" Form Placeholder " slug =" PoZJzeQ " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
147
+ <common-codepen-snippet title =" Form Placeholder " slug =" ExZvvMw " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
148
148
149
149
ユーザがフォームを入力するために必要とするすべての情報を入力欄の外側で提供するのが最善です。
150
150
@@ -178,7 +178,7 @@ Chrome DevTools で検出することで Description を確認することがで
178
178
</fieldset >
179
179
```
180
180
181
- <common-codepen-snippet title =" Form Instructions " slug =" GRoMqYy " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
181
+ <common-codepen-snippet title =" Form Instructions " slug =" WNREEqv " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
182
182
183
183
### コンテンツの非表示
184
184
@@ -212,7 +212,7 @@ CSS を使用して要素を視覚的に非表示にすることができます
212
212
}
213
213
```
214
214
215
- <common-codepen-snippet title =" Form Search " slug =" qBbpQwB " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
215
+ <common-codepen-snippet title =" Form Search " slug =" QWdMqWy " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
216
216
217
217
#### aria-hidden="true"
218
218
@@ -240,7 +240,7 @@ CSS を使用して要素を視覚的に非表示にすることができます
240
240
</form >
241
241
```
242
242
243
- <common-codepen-snippet title =" Form Buttons " slug =" PoZEXoj " :height =" 467 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
243
+ <common-codepen-snippet title =" Form Buttons " slug =" JjEyrYZ " :height =" 467 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
244
244
245
245
#### 機能的な画像
246
246
@@ -276,4 +276,4 @@ CSS を使用して要素を視覚的に非表示にすることができます
276
276
</form >
277
277
```
278
278
279
- <common-codepen-snippet title =" Functional Images " slug =" NWxXeqY " :height =" 265 " tab =" js,result " :team = " false " user = " mlama007 " name = " Maria " theme =" light " :preview =" false " :editable =" false " />
279
+ <common-codepen-snippet title =" Functional Images " slug =" jOyLGqM " :height =" 265 " tab =" js,result " theme =" light " :preview =" false " :editable =" false " />
0 commit comments