- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 25 Sep 2010 02:16:43 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv25100
Modified Files:
interactive-elements.html offline.html spec.html
Log Message:
Show best practice for use of labels in details. (whatwg r5483)
[updated by splitter]
Index: interactive-elements.html
===================================================================
RCS file: /sources/public/html5/spec/interactive-elements.html,v
retrieving revision 1.1003
retrieving revision 1.1004
diff -u -d -r1.1003 -r1.1004
--- interactive-elements.html 24 Sep 2010 22:16:45 -0000 1.1003
+++ interactive-elements.html 25 Sep 2010 02:16:40 -0000 1.1004
@@ -396,8 +396,8 @@
used to hide some controls by default:</p>
<pre><details>
- <summary>Name & Extension:</summary>
- <p><input type=text name=fn value="Pillar Magazine.pdf">
+ <summary><label for=fn>Name & Extension:</label></summary>
+ <p><input type=text id=fn name=fn value="Pillar Magazine.pdf">
<p><label><input type=checkbox name=ext checked> Hide extension</label>
</details></pre>
Index: offline.html
===================================================================
RCS file: /sources/public/html5/spec/offline.html,v
retrieving revision 1.1001
retrieving revision 1.1002
diff -u -d -r1.1001 -r1.1002
--- offline.html 24 Sep 2010 22:16:46 -0000 1.1001
+++ offline.html 25 Sep 2010 02:16:41 -0000 1.1002
@@ -2229,6 +2229,9 @@
(disconnected from the network). Returns true if the user agent
might be online.</p>
+ <p>The events <code title="event-online"><a href="#event-online">online</a></code> and <code title="event-offline"><a href="#event-offline">offline</a></code> are fired when the value of
+ this attribute changes.</p>
+
</dd>
</dl><div class="impl">
@@ -2256,4 +2259,24 @@
source</a>.</p>
</div><p class="note">This attribute is inherently unreliable. A computer
- can be connected to a network without having Internet access.</p></body></html>
\ No newline at end of file
+ can be connected to a network without having Internet access.</p><div class="example">
+
+ <p>In this example, an indicator is updated as the browser goes
+ online and offline.</p>
+
+ <pre><!DOCTYPE HTML>
+<html>
+ <head>
+ <title>Online status</title>
+ <script>
+ function updateIndicator() {
+ document.getElementById('indicator').textContext = navigator.onLine ? 'online' : 'offline';
+ }
+ </script>
+ </head>
+ <body onload="updateIndicator()" ononline="updateIndicator()" onoffline="updateIndicator()">
+ <p>The network is: <span id="indicator">(state unknown)</span>
+ </body>
+</html></pre>
+
+ </div></body></html>
\ No newline at end of file
Index: spec.html
===================================================================
RCS file: /sources/public/html5/spec/spec.html,v
retrieving revision 1.1215
retrieving revision 1.1216
diff -u -d -r1.1215 -r1.1216
--- spec.html 25 Sep 2010 01:16:33 -0000 1.1215
+++ spec.html 25 Sep 2010 02:16:41 -0000 1.1216
@@ -338,7 +338,7 @@
<a href="Overview.html">single page HTML</a>,
<a href="spec.html">multipage HTML</a>,
<a href="author/">web developer edition</a>.
-This is revision 1.4373.
+This is revision 1.4375.
</p>
<p class="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a>
© 2010 <a href="http://www.w3.org/"><abbr title="World Wide
Received on Saturday, 25 September 2010 02:16:45 UTC