Skip to content
This repository has been archived by the owner on Jun 30, 2018. It is now read-only.

First draft of log role technique #797

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions techniques/aria/aria-log-role.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>WCAG 2.0 Technique</title>
<link rel="stylesheet" type="text/css" href="sources.css"/>
</head>
<body>
<h1>Using ARIA role=log</h1>
<section class="meta">
<h2>Metadata</h2>
<p class="id">ID: W##</p>
<p class="technology">Technology: ARIA</p>
<p class="type">Type: Technique</p>
</section>
<section class="applicability">
<h2>When to Use</h2>
<p class="instructions">This technique relates to:
<ul>
<li>Success Criterion 3.2.6 Status Changes</li>
</ul>
</p>
</section>
<section class="description">
<h2>Description</h2>
<p class="instructions">
The purpose of this technique is to notify Assistive Technologies (AT) when content has been appended to sequential information concerning the application's history or logs. The aria live region role of <code>log</code> has an implicit <code>aria-live</code> value of "polite" and <code>aria-atomic</code> value of "false", which allows a user to be notified via AT (such as a screen reader) when log messages are added. The new content within the aria-live region is automatically read by the AT, without the AT having to focus on the place where the text is displayed. See <a href="https://www.w3.org/TR/wai-aria-1.1/#log">WAI-ARIA 1.1 log (role)</a> for more details.

</p>

</section>
<section id="examples">
<h2>Examples</h2>
<section class="example">
<h3>Updating the contents of a chat conversation</h3>
<p>Comments that users type into a chat input field are appended to the end of the chat history region. The region is marked with role of <code>log</code> so that new additions are announced by ATs. The <code>aria-relevant</code> attribute is set to be "additions" only so that removed or edited messages are not re-announced. When each new chat message appears, a screen reader announces its content.</p>
<div class="code">
<pre>
<code>
<div id="chatRegion" role="log" aria-labelledby="chatHeading">
<h2 id="chatHeading">Chat History</h2>
<ul id="conversation" aria-relevant="additions">
<li>The latest chat message</li>
</ul>
</div>
</code>
</pre>
</div>
<p>Working example: link</p>
</section>
<section class="example">
<h3>Updating the log of a server</h3>
<p></p>
<div class="code">
<pre>
<code>

</code>
</pre>
</div>
<p>Working example: link</p>
</section>
</section>
<section class="tests">
<h2>Tests</h2>
<section class="test-procedure">
<h3>Procedure</h3>
On a page that contains a log:
<ol>
<li>Check that the log region is inside a container given a role of <code>log</code>.</li>
</ol>
</section>
<section class="test-results">
<h3>Expected Results</h3>
<ul>
<li>#1 is true.</li>
</ul>
</section>
</section>
<section class="related">
<h2>Related Techniques</h2>
<ul>
<li>ID</li>
</ul>
</section>
</body>
</html>