-
Notifications
You must be signed in to change notification settings - Fork 5
0143-01 / ARIA23のテストを追加(事例1) #276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="ja"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>WAIC-CODE-0143-01</title> | ||
| <meta name="copyright" content="This document is licensed under a Creative Commons 4.0"> | ||
| <link rel="license" href="https://creativecommons.org/licenses/by/4.0/"> | ||
| <meta name="author" content="ウェブアクセシビリティ基盤委員会(WAIC)"> | ||
| <style> | ||
| #chatMessage { | ||
| list-style: none; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body> | ||
| <div role="main"> | ||
| <h1>チャット</h1> | ||
| <p>メッセージを送信すると、「会話のログ」見出しの後にメッセージが表示されます。<br>その後、チャットの終了を知らせるメッセージが表示されるまで、自動返信が2秒間隔で続きます。</p> | ||
| <div role="group" aria-labelledby="messageHeading"> | ||
| <h2 id="messageHeading">メッセージ入力</h2> | ||
| <p id="messageDescription">(メッセージの入力内容は変更できません)</p> | ||
| <input type="text" name="fakeinput" readonly value="こんにちわ" aria-describedby="messageDescription"> | ||
| <button id="messageButton" onclick="initiateChat()">メッセージを送る</button> | ||
| </div> | ||
| <div><a href="#chatHeading">ダミーコンテンツです。自動返信を待つ間に閲覧するメッセージで、リンク先に移動する必要はありません。ダミーコンテンツ終わり。</a></div> | ||
| <div> | ||
| <h2 id="chatHeading">会話のログ</h2> | ||
| <div id="chatLog" role="log"> | ||
| <ul id="chatMessage"></ul> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
|
|
||
| <script> | ||
| var counter = 0; | ||
| var myVar; | ||
| var onetime = 0; | ||
| function makeChat () { | ||
| var chatText = ["自動返信:こんにちわ!", "自動返信:5つカウントした後、返信を終了します", "自動返信:1", "自動返信:2", "自動返信:3", "自動返信:4", "自動返信:5", "自動返信:返信はこれで終了です"]; | ||
| var chatContent = document.getElementById("chatMessage"); | ||
| var list = document.createElement("li") | ||
| var item = document.createTextNode(chatText[counter]); | ||
| list.appendChild(item); | ||
| chatContent.appendChild(list); | ||
| counter++; | ||
| if (counter > 7) { | ||
| clearInterval(myVar); | ||
| } | ||
| } | ||
| function initiateChat () { | ||
| if (onetime < 1) { | ||
| document.getElementById("chatMessage").innerHTML += "<li>あなた:こんにちわ</li>"; | ||
| myVar = setInterval(makeChat, 2000); | ||
| document.getElementById("messageButton").disabled = true; | ||
| onetime++; | ||
| } else { | ||
| return false; | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| # テスト ID | ||
|
|
||
| WAIC-TEST-0143-01 | ||
|
|
||
| # テストのタイトル | ||
|
|
||
| role属性による逐次的な更新の通知(role="log"の使用) | ||
|
|
||
| # テストの目的 | ||
|
|
||
| role="log"を持つ要素の内容を更新した際に、更新内容だけが通知されることを確認する。 | ||
|
|
||
| # テストの対象となる達成基準 (複数) | ||
|
|
||
| 4.1.3 | ||
|
|
||
| # 関連する達成方法 (複数) | ||
|
|
||
| ARIA23 | ||
|
|
||
| # テストコードのソース (抜粋) | ||
|
|
||
| ```html | ||
| <h2 id="chatHeading">会話のログ</h2> | ||
| <div id="chatLog" role="log"> | ||
| <ul id="chatMessage"></ul> | ||
| </div> | ||
| ``` | ||
|
|
||
| ```JavaScript | ||
| function makeChat () { | ||
| var chatText = ["自動返信:こんにちわ!", "自動返信:5つカウントした後、返信を終了します", "自動返信:1", "自動返信:2", "自動返信:3", "自動返信:4", "自動返信:5", "自動返信:返信はこれで終了です"]; | ||
| var chatContent = document.getElementById("chatMessage"); | ||
| var list = document.createElement("li") | ||
| var item = document.createTextNode(chatText[counter]); | ||
| list.appendChild(item); | ||
| chatContent.appendChild(list); | ||
| counter++; | ||
| if (counter > 7) { | ||
| clearInterval(myVar); | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| # テスト手順と期待される結果 (視覚閲覧環境) | ||
|
|
||
| テスト不要 | ||
|
|
||
| # テスト実施時の注意点 (視覚閲覧環境) | ||
|
|
||
| なし | ||
|
|
||
| # テスト手順と期待される結果 (音声閲覧環境) | ||
|
|
||
| ## テスト手順 1 | ||
|
|
||
| 「メッセージを送る」ボタンを押下する | ||
|
|
||
| ## 期待される結果 1 | ||
|
|
||
| 「あなた:こんにちわ」と通知される | ||
|
|
||
| ## テスト手順 2 | ||
|
|
||
| 「メッセージを送る」ボタンのすぐ後に続く「ダミーコンテンツです」から始まるリンクへと移動する | ||
|
Comment on lines
+63
to
+65
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. テスト手順1の直後にテスト手順2を行う、といった制約なしに行えるテストになった |
||
|
|
||
| ## 期待される結果 2 | ||
|
|
||
| リンク内容の通知の後、「自動返信」から始まるメッセージが通知される(リンク内容の通知は、自動返信の通知に遮られないこと) | ||
|
|
||
| # テスト実施時の注意点 (音声閲覧環境) | ||
|
|
||
| - ブラウザのJavaScriptが有効になっていることを確認すること | ||
| - 自動返信メッセージの通知中に次の自動返信が生じた場合、それまでの自動返信は中断される場合がある | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 「log role の更新内容の通知中」に log role の更新が発生した場合、NVDA と VoiceOver とでの振る舞いの違いがありました。
NVDA の方がイメージするものに近い(log の通知として丁寧)のですが、VoiceOver の振る舞いも「古いものから開始する」が成立しているため NG とは言い切りにくいように思えました。
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| # 関連する要素や属性 | ||
|
|
||
| role属性 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
逐次的な更新に対して、更新内容だけが通知されることの確認をテストの目的としています。
更新の都度、role="log" が示す領域全体の内容が通知されることを弾きたい意図です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
相談事項:
ARIA23 のタイトルは「逐次的な情報更新を識別するために role=log を使用する」となっています。
「逐次的な情報更新を識別する」は、変更箇所のみが通知される(aria-atomic="false")ことで識別できると判断して良いでしょうか?
あるいは、logロールが通知されることで満たされると判断した方が良いでしょうか?
現状では、logロールの通知は必須ではなく「変更箇所のみが通知される」で十分と判断してテスト手順などを作成しています。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.