[html5] r3065 - [] (0) Define accesskey='' and related magic to try to Solve the Problem.
whatwg at whatwg.org
whatwg at whatwg.org
Sat May 2 18:55:10 PDT 2009
Author: ianh
Date: 2009-05-02 18:55:08 -0700 (Sat, 02 May 2009)
New Revision: 3065
Modified:
index
source
Log:
[] (0) Define accesskey='' and related magic to try to Solve the Problem.
Modified: index
===================================================================
--- index 2009-05-02 21:34:09 UTC (rev 3064)
+++ index 2009-05-03 01:55:08 UTC (rev 3065)
@@ -39,7 +39,7 @@
<div class=head>
<p><a class=logo href=http://www.whatwg.org/ rel=home><img alt=WHATWG src=/images/logo></a></p>
<h1>HTML 5</h1>
- <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 2 May 2009</h2>
+ <h2 class="no-num no-toc" id=draft-recommendation-—-date:-01-jan-1901>Draft Recommendation — 3 May 2009</h2>
<p>You can take part in this work. <a href=http://www.whatwg.org/mailing-list>Join the working group's discussion list.</a></p>
<p><strong>Web designers!</strong> We have a <a href=http://blog.whatwg.org/faq/>FAQ</a>, a <a href=http://forums.whatwg.org/>forum</a>, and a <a href=http://www.whatwg.org/mailing-list#help>help mailing list</a> for you!</p>
<dl><dt>Multiple-page version:</dt>
@@ -653,7 +653,8 @@
<li><a href=#using-the-option-element-to-define-a-command><span class=secno>4.11.6.4 </span>Using the <code>option</code> element to define a command</a></li>
<li><a href=#using-the-command-element-to-define-a-command><span class=secno>4.11.6.5 </span>Using the <code>command</code> element to define
a command</a></li>
- <li><a href=#using-the-bb-element-to-define-a-command><span class=secno>4.11.6.6 </span>Using the <code>bb</code> element to define a command</a></ol></ol></li>
+ <li><a href=#using-the-bb-element-to-define-a-command><span class=secno>4.11.6.6 </span>Using the <code>bb</code> element to define a command</a></li>
+ <li><a href=#using-the-accesskey-attribute-to-define-a-command><span class=secno>4.11.6.7 </span>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command</a></ol></ol></li>
<li><a href=#miscellaneous-elements><span class=secno>4.12 </span>Miscellaneous elements</a>
<ol>
<li><a href=#the-legend-element><span class=secno>4.12.1 </span>The <code>legend</code> element</a></li>
@@ -807,44 +808,45 @@
<li><a href=#focus-management><span class=secno>6.5.2 </span>Focus management</a></li>
<li><a href=#document-level-focus-apis><span class=secno>6.5.3 </span>Document-level focus APIs</a></li>
<li><a href=#element-level-focus-apis><span class=secno>6.5.4 </span>Element-level focus APIs</a></ol></li>
- <li><a href=#selection><span class=secno>6.6 </span>The text selection APIs</a>
+ <li><a href=#the-accesskey-attribute><span class=secno>6.6 </span>The <code>accesskey</code> attribute</a></li>
+ <li><a href=#selection><span class=secno>6.7 </span>The text selection APIs</a>
<ol>
- <li><a href=#documentSelection><span class=secno>6.6.1 </span>APIs for the browsing context selection</a></li>
- <li><a href=#textFieldSelection><span class=secno>6.6.2 </span>APIs for the text field selections</a></ol></li>
- <li><a href=#contenteditable><span class=secno>6.7 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
+ <li><a href=#documentSelection><span class=secno>6.7.1 </span>APIs for the browsing context selection</a></li>
+ <li><a href=#textFieldSelection><span class=secno>6.7.2 </span>APIs for the text field selections</a></ol></li>
+ <li><a href=#contenteditable><span class=secno>6.8 </span>The <code title=attr-contenteditable>contenteditable</code> attribute</a>
<ol>
- <li><a href=#user-editing-actions><span class=secno>6.7.1 </span>User editing actions</a></li>
- <li><a href=#making-entire-documents-editable><span class=secno>6.7.2 </span>Making entire documents editable</a></ol></li>
- <li><a href=#spelling-and-grammar-checking><span class=secno>6.8 </span>Spelling and grammar checking</a></li>
- <li><a href=#dnd><span class=secno>6.9 </span>Drag and drop</a>
+ <li><a href=#user-editing-actions><span class=secno>6.8.1 </span>User editing actions</a></li>
+ <li><a href=#making-entire-documents-editable><span class=secno>6.8.2 </span>Making entire documents editable</a></ol></li>
+ <li><a href=#spelling-and-grammar-checking><span class=secno>6.9 </span>Spelling and grammar checking</a></li>
+ <li><a href=#dnd><span class=secno>6.10 </span>Drag and drop</a>
<ol>
- <li><a href=#introduction-4><span class=secno>6.9.1 </span>Introduction</a></li>
- <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>6.9.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
- <li><a href=#events-fired-during-a-drag-and-drop-action><span class=secno>6.9.3 </span>Events fired during a drag-and-drop action</a></li>
- <li><a href=#drag-and-drop-processing-model><span class=secno>6.9.4 </span>Drag-and-drop processing model</a>
+ <li><a href=#introduction-4><span class=secno>6.10.1 </span>Introduction</a></li>
+ <li><a href=#the-dragevent-and-datatransfer-interfaces><span class=secno>6.10.2 </span>The <code>DragEvent</code> and <code>DataTransfer</code> interfaces</a></li>
+ <li><a href=#events-fired-during-a-drag-and-drop-action><span class=secno>6.10.3 </span>Events fired during a drag-and-drop action</a></li>
+ <li><a href=#drag-and-drop-processing-model><span class=secno>6.10.4 </span>Drag-and-drop processing model</a>
<ol>
- <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+ <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.10.4.1 </span>When the drag-and-drop operation starts or ends in another
document</a></li>
- <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>6.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+ <li><a href=#when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>6.10.4.2 </span>When the drag-and-drop operation starts or ends in another
application</a></ol></li>
- <li><a href=#the-draggable-attribute><span class=secno>6.9.5 </span>The <code>draggable</code> attribute</a></li>
- <li><a href=#copy-and-paste><span class=secno>6.9.6 </span>Copy and paste</a>
+ <li><a href=#the-draggable-attribute><span class=secno>6.10.5 </span>The <code>draggable</code> attribute</a></li>
+ <li><a href=#copy-and-paste><span class=secno>6.10.6 </span>Copy and paste</a>
<ol>
- <li><a href=#copy-to-clipboard><span class=secno>6.9.6.1 </span>Copy to clipboard</a></li>
- <li><a href=#cut-to-clipboard><span class=secno>6.9.6.2 </span>Cut to clipboard</a></li>
- <li><a href=#paste-from-clipboard><span class=secno>6.9.6.3 </span>Paste from clipboard</a></li>
- <li><a href=#paste-from-selection><span class=secno>6.9.6.4 </span>Paste from selection</a></ol></li>
- <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>6.9.7 </span>Security risks in the drag-and-drop model</a></ol></li>
- <li><a href=#undo><span class=secno>6.10 </span>Undo history</a>
+ <li><a href=#copy-to-clipboard><span class=secno>6.10.6.1 </span>Copy to clipboard</a></li>
+ <li><a href=#cut-to-clipboard><span class=secno>6.10.6.2 </span>Cut to clipboard</a></li>
+ <li><a href=#paste-from-clipboard><span class=secno>6.10.6.3 </span>Paste from clipboard</a></li>
+ <li><a href=#paste-from-selection><span class=secno>6.10.6.4 </span>Paste from selection</a></ol></li>
+ <li><a href=#security-risks-in-the-drag-and-drop-model><span class=secno>6.10.7 </span>Security risks in the drag-and-drop model</a></ol></li>
+ <li><a href=#undo><span class=secno>6.11 </span>Undo history</a>
<ol>
- <li><a href=#introduction-5><span class=secno>6.10.1 </span>Introduction</a></li>
- <li><a href=#definitions-2><span class=secno>6.10.2 </span>Definitions</a></li>
- <li><a href=#the-undomanager-interface><span class=secno>6.10.3 </span>The <code>UndoManager</code> interface</a></li>
- <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>6.10.4 </span>Undo: moving back in the undo transaction history</a></li>
- <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>6.10.5 </span>Redo: moving forward in the undo transaction history</a></li>
- <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>6.10.6 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
- <li><a href=#implementation-notes><span class=secno>6.10.7 </span>Implementation notes</a></ol></li>
- <li><a href=#editing-apis><span class=secno>6.11 </span>Editing APIs</a></ol></li>
+ <li><a href=#introduction-5><span class=secno>6.11.1 </span>Introduction</a></li>
+ <li><a href=#definitions-2><span class=secno>6.11.2 </span>Definitions</a></li>
+ <li><a href=#the-undomanager-interface><span class=secno>6.11.3 </span>The <code>UndoManager</code> interface</a></li>
+ <li><a href=#undo:-moving-back-in-the-undo-transaction-history><span class=secno>6.11.4 </span>Undo: moving back in the undo transaction history</a></li>
+ <li><a href=#redo:-moving-forward-in-the-undo-transaction-history><span class=secno>6.11.5 </span>Redo: moving forward in the undo transaction history</a></li>
+ <li><a href=#the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>6.11.6 </span>The <code>UndoManagerEvent</code> interface and the <code title=event-undo>undo</code> and <code title=event-redo>redo</code> events</a></li>
+ <li><a href=#implementation-notes><span class=secno>6.11.7 </span>Implementation notes</a></ol></li>
+ <li><a href=#editing-apis><span class=secno>6.12 </span>Editing APIs</a></ol></li>
<li><a href=#comms><span class=secno>7 </span>Communication</a>
<ol>
<li><a href=#event-definitions><span class=secno>7.1 </span>Event definitions</a></li>
@@ -7803,6 +7805,8 @@
attribute long <a href=#dom-tabindex title=dom-tabindex>tabIndex</a>;
void <a href=#dom-focus title=dom-focus>focus</a>();
void <a href=#dom-blur title=dom-blur>blur</a>();
+ attribute DOMString <a href=#dom-accesskey title=dom-accessKey>accessKey</a>;
+ readonly attribute DOMString <a href=#dom-accesskeylabel title=dom-accessKeyLabel>accessKeyLabel</a>;
attribute boolean <a href=#dom-draggable title=dom-draggable>draggable</a>;
attribute DOMString <a href=#dom-contenteditable title=dom-contentEditable>contentEditable</a>;
readonly attribute boolean <a href=#dom-iscontenteditable title=dom-isContentEditable>isContentEditable</a>;
@@ -7891,7 +7895,8 @@
all <a href=#html-elements>HTML elements</a><span class=impl> (even those not
defined in this specification)</span>:</p>
- <ul class=brief><li><code title=attr-class><a href=#classes>class</a></code></li>
+ <ul class=brief><li><code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code></li>
+ <li><code title=attr-class><a href=#classes>class</a></code></li>
<li><code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code></li>
<li><code title=attr-contextmenu><a href=#attr-contextmenu>contextmenu</a></code></li>
<li><code title=attr-dir><a href=#the-dir-attribute>dir</a></code></li>
@@ -39378,6 +39383,11 @@
represents the action. A command might not have an Icon.</dd> <!--
changing base URLs might change the icon -->
+ <dt><dfn id=command-facet-accesskey title=command-facet-AccessKey>Access Key</dfn></dt>
+
+ <dd>A key combination selected by the user agent that triggers the
+ command. A command might not have an Access Key.</dd>
+
<dt><dfn id=command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</dfn></dt>
<dd>Whether the command is hidden or not (basically, whether it
@@ -39450,6 +39460,14 @@
</dd>
+ <dt><var title="">element</var> . <code title=dom-accessKeyLabel><a href=#dom-accesskeylabel>accessKeyLabel</a></code></dt>
+
+ <dd>
+
+ <p>Exposes the <a href=#command-facet-accesskey title=command-facet-AccessKey>Access Key</a> facet of the command.</p>
+
+ </dd>
+
<dt><var title="">element</var> . <code title=dom-hidden><a href=#dom-hidden>hidden</a></code></dt>
<dd>
@@ -39542,10 +39560,10 @@
<p class=note>The <a href=#command-facet-id title=command-facet-ID>ID</a> facet
is exposed by the the <code title=dom-id><a href=#dom-id>id</a></code> DOM attribute,
the <a href=#command-facet-hint title=command-facet-Hint>Hint</a> facet is exposed by
- the <code title=dom-title><a href=#dom-title>title</a></code> DOM attribute, and the
- <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a> facet is
- exposed by the <code title=dom-hidden><a href=#dom-hidden>hidden</a></code> DOM
- attribute.</p>
+ the <code title=dom-title><a href=#dom-title>title</a></code> DOM attribute, the <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> facet is exposed by
+ the <code title=dom-accessKeyLabel><a href=#dom-accesskeylabel>accessKeyLabel</a></code> DOM
+ attribute, and the <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden
+ State</a> facet is exposed by the <code title=dom-hidden><a href=#dom-hidden>hidden</a></code> DOM attribute.</p>
</div>
@@ -39564,6 +39582,10 @@
</div>
+ <hr><p>User agents may expose the <a href=#concept-command title=concept-command>commands</a> whose <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a> facet is false
+ (visible), e.g. in the user agent's menu bar. User agents are
+ encouraged to do this especially for commands that have <a href=#command-facet-accesskey title=command-facet-AccessKey>Access Keys</a>, as a way to
+ advertise those keys to the user.</p>
<div class=impl>
@@ -39595,6 +39617,10 @@
element, if there is such an element and resolving its attribute is
successful. Otherwise, there is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command.</p>
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>, if
+ any.</p>
+
<p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
otherwise.</p>
@@ -39614,7 +39640,7 @@
<p>A <code><a href=#the-button-element>button</a></code> element always <a href=#concept-command title=concept-command>defines a command</a>.</p>
- <p>The <a href=#command-facet-type title=command-facet-Type>Type</a>, <a href=#command-facet-id title=command-facet-ID>ID</a>, <a href=#command-facet-label title=command-facet-Label>Label</a>, <a href=#command-facet-hint title=command-facet-Hint>Hint</a>, <a href=#command-facet-icon title=command-facet-Icon>Icon</a>, <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>, <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked State</a>, and <a href=#command-facet-action title=command-facet-Action>Action</a> facets of the command are
+ <p>The <a href=#command-facet-type title=command-facet-Type>Type</a>, <a href=#command-facet-id title=command-facet-ID>ID</a>, <a href=#command-facet-label title=command-facet-Label>Label</a>, <a href=#command-facet-hint title=command-facet-Hint>Hint</a>, <a href=#command-facet-icon title=command-facet-Icon>Icon</a>, <a href=#command-facet-accesskey title=command-facet-AccessKey>Access Key</a>, <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>, <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked State</a>, and <a href=#command-facet-action title=command-facet-Action>Action</a> facets of the command are
determined <a href=#using-the-a-element-to-define-a-command title=a-command>as for <code>a</code>
elements</a> (see the previous section).</p>
@@ -39649,7 +39675,7 @@
"radio" or "checkbox". If the element is a <a href=#labeled-control>labeled
control</a>, the <code><a href=#textcontent>textContent</a></code> of the first
<code><a href=#the-label-element>label</a></code> element in <a href=#tree-order>tree order</a> whose
- <a href=#labeled-control>labeled control</a> is the element in question is the <a href=#command-facet-label title=command-facet-Label>Label</a> (in DOM terms, this the
+ <a href=#labeled-control>labeled control</a> is the element in question is the <a href=#command-facet-label title=command-facet-Label>Label</a> (in DOM terms, this is the
string given by <code><var title="">element</var>.labels[0].textContent</code>). Otherwise,
the value of the <code title=attr-input-value><a href=#attr-input-value>value</a></code>
attribute, if present, is the <a href=#command-facet-label title=command-facet-Label>Label</a>. Otherwise, the <a href=#command-facet-label title=command-facet-Label>Label</a> is the empty string.</p>
@@ -39663,6 +39689,10 @@
<p>There is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the
command.</p>
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>, if
+ any.</p>
+
<p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
otherwise.</p>
@@ -39711,6 +39741,10 @@
<p>There is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the
command.</p>
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>, if
+ any.</p>
+
<p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
otherwise.</p>
@@ -39760,6 +39794,10 @@
element, if it has such an attribute and resolving it is
successful. Otherwise, there is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the command.</p>
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>, if
+ any.</p>
+
<p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
otherwise.</p>
@@ -39810,6 +39848,10 @@
successful. Otherwise, the <a href=#command-facet-icon title=command-facet-Icon>Icon</a> is a user-agent-defined image
appropriate for the <code><a href=#the-bb-element>bb</a></code> element's <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute's state.</p>
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>, if
+ any.</p>
+
<p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
facet of the command is true (hidden) if the <code><a href=#the-bb-element>bb</a></code>
element's <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute's state
@@ -39830,6 +39872,62 @@
element's <code title=attr-bb-type><a href=#attr-bb-type>type</a></code> attribute's
state.</p>
+
+ <h5 id=using-the-accesskey-attribute-to-define-a-command><span class=secno>4.11.6.7 </span><dfn title=accesskey-command>Using the <code title=attr-accesskey>accesskey</code> attribute to define a command</dfn></h5>
+
+ <p>An element that is <a href=#focusable>focusable</a>, has an <a href=#assigned-access-key>assigned
+ access key</a>, and is neither an <code><a href=#the-a-element>a</a></code> element with an
+ <code title=attr-a-href>href</code> attribute, a
+ <code><a href=#the-button-element>button</a></code> element, an <code><a href=#the-input-element>input</a></code> element whose
+ attribute is in one of the <a href=#submit-button-state title=attr-input-type-submit>Submit Button</a>, <a href=#reset-button-state title=attr-input-type-reset>Reset Button</a>, <a href=#button-state title=attr-input-type-button>Button</a>, <a href=#radio-button-state title=attr-input-type-radio>Radio Button</a>, or <a href=#checkbox-state title=attr-input-type-checkbox>Checkbox</a> states, an
+ <code><a href=#the-option-element>option</a></code> element with an ancestor <code><a href=#the-select-element>select</a></code>
+ element and either no <code title=attr-option-value><a href=#attr-option-value>value</a></code>
+ attribute or a <code title=attr-option-value><a href=#attr-option-value>value</a></code>
+ attribute that is not the empty string, a <code><a href=#the-command>command</a></code>
+ element, nor a <code><a href=#the-bb-element>bb</a></code> element, <a href=#concept-command title=concept-command>defines a command</a>.</p>
+
+ <p>The <a href=#command-facet-type title=command-facet-Type>Type</a> of the command
+ is "command".</p>
+
+ <p>The <a href=#command-facet-id title=command-facet-ID>ID</a> of the command is
+ the value of the <code title=attr-id><a href=#the-id-attribute>id</a></code> attribute of the
+ element, if the attribute is present and not empty. Otherwise the
+ command is an <a href=#anonymous-command>anonymous command</a>.</p>
+
+ <p>The <a href=#command-facet-label title=command-facet-Label>Label</a> of the command
+ depends on the element. If the element is a <a href=#labeled-control>labeled
+ control</a>, the <code><a href=#textcontent>textContent</a></code> of the first
+ <code><a href=#the-label-element>label</a></code> element in <a href=#tree-order>tree order</a> whose
+ <a href=#labeled-control>labeled control</a> is the element in question is the <a href=#command-facet-label title=command-facet-Label>Label</a> (in DOM terms, this is the
+ string given by <code><var title="">element</var>.labels[0].textContent</code>). Otherwise, the
+ <a href=#command-facet-label title=command-facet-Label>Label</a> is the
+ <code><a href=#textcontent>textContent</a></code> of the element itself.</p>
+
+ <p>The <a href=#command-facet-hint title=command-facet-Hint>Hint</a> of the command
+ is the value of the <code title=attr-title><a href=#the-title-attribute>title</a></code> attribute
+ of the element. If the attribute is not present, the <a href=#command-facet-hint title=command-facet-Hint>Hint</a> is the empty string.</p>
+
+ <p>There is no <a href=#command-facet-icon title=command-facet-Icon>Icon</a> for the
+ command.</p>
+
+ <p>The <a href=#command-facet-accesskey title=command-facet-AccessKey>AccessKey</a> of the
+ command is the element's <a href=#assigned-access-key>assigned access key</a>.</p>
+
+ <p>The <a href=#command-facet-hiddenstate title=command-facet-HiddenState>Hidden State</a>
+ of the command is true (hidden) if the element has a <code title=attr-hidden><a href=#the-hidden-attribute>hidden</a></code> attribute, and false
+ otherwise.</p>
+
+ <p>The <a href=#command-facet-disabledstate title=command-facet-DisabledState>Disabled
+ State</a> facet of the command is always false. (The command is
+ always enabled.)</p>
+
+ <p>The <a href=#command-facet-checkedstate title=command-facet-CheckedState>Checked State</a>
+ of the command is always false. (The command is never checked.)</p>
+
+ <p>The <a href=#command-facet-action title=command-facet-Action>Action</a> of the
+ command is to run the <a href=#focusing-steps>focusing steps</a> for the
+ element.</p>
+
</div>
@@ -48115,6 +48213,8 @@
and submit respectively. Only their presentation to the user
changes.</p>
+ <div class=impl>
+
<!-- XXX might be worth disabling user interaction event submission
in hidden areas? e.g. make onmousemove and onclick and form controls
not respond to input? -->
@@ -48123,8 +48223,10 @@
attribute must <a href=#reflect>reflect</a> the content attribute of the
same name.</p>
+ </div>
+
<h3 id=activation><span class=secno>6.3 </span>Activation</h3>
<!-- v2 idea: HTMLImageElement.click(x, y); or clickPoint(), if
@@ -48581,8 +48683,154 @@
- <h3 id=selection><span class=secno>6.6 </span>The text selection APIs</h3>
+
+ <h3 id=the-accesskey-attribute><span class=secno>6.6 </span>The <dfn title=attr-accesskey><code>accesskey</code></dfn> attribute</h3>
+
+ <p>All elements may have the <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> content attribute set. The
+ <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> attribute's value is
+ used by the user agent as a guide for creating a keyboard shortcut
+ that activates or focuses the element.</p>
+
+ <p>If specified, the value must be an <a href=#ordered-set-of-unique-space-separated-tokens>ordered set of unique
+ space-separated tokens</a>, each of which must be exactly one
+ Unicode code point in length.</p>
+
+ <div class=impl>
+
+ <p>An element's <dfn id=assigned-access-key>assigned access key</dfn> is a key combination
+ derived from the element's <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> content attribute as
+ follows:</p>
+
+ <ol><li><p>If the element has no <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> attribute, then the element
+ has no <a href=#assigned-access-key>assigned access key</a>.</li>
+
+ <li><p>Otherwise, the user agent must must <a href=#split-a-string-on-spaces title="split a
+ string on spaces">split the attribute's value on spaces</a>, and
+ let <var title="">keys</var> be the resulting tokens.</li>
+
+ <li>
+
+ <p>For each value in <var title="">keys</var> in turn, in the
+ order the tokens appeared in the attribute's value, run the
+ following substeps:</p>
+
+ <ol><li><p>If the value is not a string exactly one Unicode code
+ point in length, then skip the remainder of these steps for this
+ value.</li>
+
+ <li><p>If the value does not correspond to a key on the system's
+ keyboard, then skip the remainder of these steps for this
+ value.</li>
+
+ <li><p>If the user agent can find a combination of modifier keys
+ that, with the key that corresponds to the value given in the
+ attribute, can be used as a shortcut key, then the user agent may
+ assign that combination of keys as the element's <a href=#assigned-access-key>assigned
+ access key</a> and abort these steps.</li>
+
+ </ol></li>
+
+ <li><p>If none of the values (if any) result in an access key being
+ assigned, then the element has no <a href=#assigned-access-key>assigned access
+ key</a>.</li>
+
+ </ol><p>Once a user agent has selected and assigned an access key for an
+ element, the user agent should not change the element's
+ <a href=#assigned-access-key>assigned access key</a> unless the <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> content attribute is changed
+ or the element is moved to another <code>Document</code>.</p>
+
+ <p>When the user presses the key combination corresponding to the
+ <a href=#assigned-access-key>assigned access key</a> for an element, if the element
+ <a href=#concept-command title=concept-command>defines a command</a>, the user
+ agent must trigger the <a href=#command-facet-action title=command-facet-Action>Action</a> of the command.</p>
+
+ <p>User agents may expose elements that have an <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> attribute in other ways as
+ well, e.g. in a menu displayed in response to a specific key
+ combination.</p>
+
+ </div>
+
+ <div class=impl>
+
+ <p>The <dfn id=dom-accesskey title=dom-accessKey><code>accessKey</code></dfn> DOM
+ attribute must <a href=#reflect>reflect</a> the <code title=attr-accesskey><a href=#the-accesskey-attribute>accesskey</a></code> content attribute.</p>
+
+ <p>The <dfn id=dom-accesskeylabel title=dom-accessKeyLabel><code>accessKeyLabel</code></dfn> DOM
+ attribute must return a string that represents the element's
+ <a href=#assigned-access-key>assigned access key</a>, if any. If the element does not
+ have one, then the DOM attribute must return the empty string.</p>
+
+ </div>
+
+ <div class=example>
+
+ <p>In the following example, a variety of links are given with
+ access keys so that keyboard users familiar with the site can
+ more quickly navigate to the relevant pages:</p>
+
+ <pre><nav>
+ <p>
+ <a title="Consortium Activities" accesskey="A" href="/Consortium/activities">Activities</a> |
+ <a title="Technical Reports and Recommendations" accesskey="T" href="/TR/">Technical Reports</a> |
+ <a title="Alphabetical Site Index" accesskey="S" href="/Consortium/siteindex">Site Index</a> |
+ <a title="About This Site" accesskey="B" href="/Consortium/">About Consortium</a> |
+ <a title="Contact Consortium" accesskey="C" href="/Consortium/contact">Contact</a>
+ </p>
+</nav></pre>
+
+ </div>
+
+ <div class=example>
+
+ <p>In the following example, the search field is given two possible
+ access keys, "s" and "0" (in that order). A user agent on a device
+ with a full keyboard might pick
+ <kbd><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd></kbd> as the
+ shortcut key, while a user agent on a small device with just a
+ numeric keypad might pick just the plain unadorned key
+ <kbd><kbd>0</kbd></kbd>:</p>
+
+ <pre><form action="/search">
+ <label>Search: <input type="search" name="q" accesskey="s 0"></label>
+ <input type="submit">
+</form></pre>
+
+ </div>
+
+ <div class=example>
+
+ <p>In the following example, a button has possible access keys
+ described. A script then tries to update the button's label to
+ advertise the key combination the user agent selected.</p>
+
+ <pre><input type=submit accesskey="N @ 1" value="Compose">
+...
+<script>
+ function labelButton(button) {
+ if (button.accessKeyLabel)
+ button.value += ' (' + button.accessKeyLabel + ')';
+ }
+ var inputs = document.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i += 1) {
+ if (inputs[i].type == "submit")
+ labelButton(inputs[i]);
+ }
+</script></pre>
+
+ <p>On one user agent, the button's label might become
+ "<samp>Compose (⌘N)</samp>". On another, it might become
+ "<samp>Compose (Alt+⇧+1)</samp>". If the user agent doesn't
+ assign a key, it will be just "<samp>Compose</samp>". The exact
+ string depends on what the <a href=#assigned-access-key>assigned access key</a> is, and
+ on how the user agent represents that key combination.</p>
+
+ </div>
+
+
+
+ <h3 id=selection><span class=secno>6.7 </span>The text selection APIs</h3>
+
<p>Every <a href=#browsing-context>browsing context</a> has <dfn id=the-selection title="the
selection">a selection</dfn>. The selection can be empty, and the
selection can have more than one range (a disjointed selection). The
@@ -48654,7 +48902,7 @@
- <h4 id=documentSelection><span class=secno>6.6.1 </span>APIs for the browsing context selection</h4>
+ <h4 id=documentSelection><span class=secno>6.7.1 </span>APIs for the browsing context selection</h4>
<dl class=domintro><dt><var title="">window</var> . <code title=dom-getSelection><a href=#dom-getselection>getSelection</a></code>()</dt>
<dt><var title="">document</var> . <code title=dom-document-getSelection><a href=#dom-document-getselection>getSelection</a></code>()</dt>
@@ -48974,7 +49222,7 @@
-->
- <h4 id=textFieldSelection><span class=secno>6.6.2 </span>APIs for the text field selections</h4>
+ <h4 id=textFieldSelection><span class=secno>6.7.2 </span>APIs for the text field selections</h4>
<!-- v2 idea: DOM Range APIs to expose the textarea/input edited
value (ack martijnw) -->
@@ -49098,7 +49346,7 @@
- <h3 id=contenteditable><span class=secno>6.7 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
+ <h3 id=contenteditable><span class=secno>6.8 </span>The <code title=attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> attribute</h3>
<p>The <dfn id=attr-contenteditable title=attr-contenteditable><code>contenteditable</code></dfn>
attribute is an <a href=#enumerated-attribute>enumerated attribute</a> whose keywords are
@@ -49207,7 +49455,7 @@
<div class=impl>
- <h4 id=user-editing-actions><span class=secno>6.7.1 </span>User editing actions</h4>
+ <h4 id=user-editing-actions><span class=secno>6.8.1 </span>User editing actions</h4>
<p>There are several actions that the user agent should allow the
user to perform while the user is interacting with an editing
@@ -49393,7 +49641,7 @@
- <h4 id=making-entire-documents-editable><span class=secno>6.7.2 </span>Making entire documents editable</h4>
+ <h4 id=making-entire-documents-editable><span class=secno>6.8.2 </span>Making entire documents editable</h4>
<div class=impl>
@@ -49435,7 +49683,7 @@
- <h3 id=spelling-and-grammar-checking><span class=secno>6.8 </span>Spelling and grammar checking</h3>
+ <h3 id=spelling-and-grammar-checking><span class=secno>6.9 </span>Spelling and grammar checking</h3>
<div class=impl>
@@ -49621,7 +49869,7 @@
- <h3 id=dnd><span class=secno>6.9 </span><dfn>Drag and drop</dfn></h3>
+ <h3 id=dnd><span class=secno>6.10 </span><dfn>Drag and drop</dfn></h3>
<!--XXX
@@ -49683,14 +49931,14 @@
</div>
- <h4 id=introduction-4><span class=secno>6.9.1 </span>Introduction</h4>
+ <h4 id=introduction-4><span class=secno>6.10.1 </span>Introduction</h4>
<p><em>This section is non-normative.</em></p>
<p class=XXX>It's also currently non-existent.</p>
- <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>6.9.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
+ <h4 id=the-dragevent-and-datatransfer-interfaces><span class=secno>6.10.2 </span>The <code><a href=#dragevent>DragEvent</a></code> and <code><a href=#datatransfer>DataTransfer</a></code> interfaces</h4>
<p>The drag-and-drop processing model involves several events. They
all use the <code><a href=#dragevent>DragEvent</a></code> interface.</p>
@@ -49908,7 +50156,7 @@
</div>
- <h4 id=events-fired-during-a-drag-and-drop-action><span class=secno>6.9.3 </span>Events fired during a drag-and-drop action</h4>
+ <h4 id=events-fired-during-a-drag-and-drop-action><span class=secno>6.10.3 </span>Events fired during a drag-and-drop action</h4>
<p>The following events are involved in the drag-and-drop
model. <span class=impl>Whenever the processing model described
@@ -50032,7 +50280,7 @@
<div class=impl>
- <h4 id=drag-and-drop-processing-model><span class=secno>6.9.4 </span>Drag-and-drop processing model</h4>
+ <h4 id=drag-and-drop-processing-model><span class=secno>6.10.4 </span>Drag-and-drop processing model</h4>
<p>When the user attempts to begin a drag operation, the user agent
must first determine what is being dragged. If the drag operation
@@ -50415,7 +50663,7 @@
<div class=impl>
- <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.9.4.1 </span>When the drag-and-drop operation starts or ends in another
+ <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-document><span class=secno>6.10.4.1 </span>When the drag-and-drop operation starts or ends in another
document</h5>
<p>The model described above is independent of which
@@ -50434,7 +50682,7 @@
<div class=impl>
- <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>6.9.4.2 </span>When the drag-and-drop operation starts or ends in another
+ <h5 id=when-the-drag-and-drop-operation-starts-or-ends-in-another-application><span class=secno>6.10.4.2 </span>When the drag-and-drop operation starts or ends in another
application</h5>
<p>If the drag is initiated in another application, the <a href=#source-node>source
@@ -50460,7 +50708,7 @@
</div>
- <h4 id=the-draggable-attribute><span class=secno>6.9.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
+ <h4 id=the-draggable-attribute><span class=secno>6.10.5 </span>The <dfn title=attr-draggable><code>draggable</code></dfn> attribute</h4>
<p>All elements may have the <code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> content attribute set. The
<code title=attr-draggable><a href=#the-draggable-attribute>draggable</a></code> attribute is an
@@ -50520,7 +50768,7 @@
- <h4 id=copy-and-paste><span class=secno>6.9.6 </span>Copy and paste</h4>
+ <h4 id=copy-and-paste><span class=secno>6.10.6 </span>Copy and paste</h4>
<p>Copy-and-paste is a form of drag-and-drop: the "copy" part is
equivalent to dragging content to another application (the
@@ -50534,7 +50782,7 @@
<div class=impl>
- <h5 id=copy-to-clipboard><span class=secno>6.9.6.1 </span>Copy to clipboard</h5>
+ <h5 id=copy-to-clipboard><span class=secno>6.10.6.1 </span>Copy to clipboard</h5>
<p>When the user invokes a copy operation, the user agent must act
as if the user had invoked a drag on the current selection. If the
@@ -50548,14 +50796,14 @@
operations (e.g. updating the clipboard).</p>
- <h5 id=cut-to-clipboard><span class=secno>6.9.6.2 </span>Cut to clipboard</h5>
+ <h5 id=cut-to-clipboard><span class=secno>6.10.6.2 </span>Cut to clipboard</h5>
<p>When the user invokes a cut operation, the user agent must act as
if the user had invoked a copy operation (see the previous section),
followed, if the copy was completed successfully, by <a href=#contenteditable-delete>a selection delete operation</a>.</p>
- <h5 id=paste-from-clipboard><span class=secno>6.9.6.3 </span>Paste from clipboard</h5>
+ <h5 id=paste-from-clipboard><span class=secno>6.10.6.3 </span>Paste from clipboard</h5>
<p>When the user invokes a clipboard paste operation, the user agent
must act as if the user had invoked a drag on a hypothetical
@@ -50569,7 +50817,7 @@
canceling it.</p>
- <h5 id=paste-from-selection><span class=secno>6.9.6.4 </span>Paste from selection</h5>
+ <h5 id=paste-from-selection><span class=secno>6.10.6.4 </span>Paste from selection</h5>
<p>When the user invokes a selection paste operation, the user agent
must act as if the user had invoked a drag on the current selection,
@@ -50583,7 +50831,7 @@
<div class=impl>
- <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>6.9.7 </span>Security risks in the drag-and-drop model</h4>
+ <h4 id=security-risks-in-the-drag-and-drop-model><span class=secno>6.10.7 </span>Security risks in the drag-and-drop model</h4>
<p>User agents must not make the data added to the
<code><a href=#datatransfer>DataTransfer</a></code> object during the <code title=event-dragstart><a href=#event-dragstart>dragstart</a></code> event available to scripts
@@ -50609,19 +50857,19 @@
</div>
- <h3 id=undo><span class=secno>6.10 </span><dfn>Undo history</dfn></h3>
+ <h3 id=undo><span class=secno>6.11 </span><dfn>Undo history</dfn></h3>
<p class=XXX>There has got to be a better way of doing this, surely.</p>
- <h4 id=introduction-5><span class=secno>6.10.1 </span>Introduction</h4>
+ <h4 id=introduction-5><span class=secno>6.11.1 </span>Introduction</h4>
<p class=XXX>...</p>
<div class=impl>
- <h4 id=definitions-2><span class=secno>6.10.2 </span>Definitions</h4>
+ <h4 id=definitions-2><span class=secno>6.11.2 </span>Definitions</h4>
<p>The user agent must associate an <dfn id=undo-transaction-history>undo transaction
history</dfn> with each <code><a href=#htmldocument>HTMLDocument</a></code> object.</p>
@@ -50662,7 +50910,7 @@
</div>
- <h4 id=the-undomanager-interface><span class=secno>6.10.3 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
+ <h4 id=the-undomanager-interface><span class=secno>6.11.3 </span>The <code><a href=#undomanager>UndoManager</a></code> interface</h4>
<div class=impl>
@@ -50868,7 +51116,7 @@
<div class=impl>
- <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>6.10.4 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
+ <h4 id=undo:-moving-back-in-the-undo-transaction-history><span class=secno>6.11.4 </span><dfn title=do-undo>Undo: moving back in the undo transaction history</dfn></h4>
<p>When the user invokes an undo operation, or when the <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
called with the <code title=command-undo><a href=#command-undo>undo</a></code> command, the
@@ -50905,7 +51153,7 @@
command to undo his undo.</p>
- <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>6.10.5 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
+ <h4 id=redo:-moving-forward-in-the-undo-transaction-history><span class=secno>6.11.5 </span><dfn title=do-redo>Redo: moving forward in the undo transaction history</dfn></h4>
<p>When the user invokes a redo operation, or when the <code title=dom-document-execCommand><a href=#execCommand>execCommand()</a></code> method is
called with the <code title=command-redo><a href=#command-redo>redo</a></code> command, the
@@ -50942,7 +51190,7 @@
</div>
- <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>6.10.6 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
+ <h4 id=the-undomanagerevent-interface-and-the-undo-and-redo-events><span class=secno>6.11.6 </span>The <code><a href=#undomanagerevent>UndoManagerEvent</a></code> interface and the <code title=event-undo><a href=#event-undo>undo</a></code> and <code title=event-redo><a href=#event-redo>redo</a></code> events</h4>
<pre class=idl>interface <dfn id=undomanagerevent>UndoManagerEvent</dfn> : Event {
readonly attribute any <a href=#dom-undomanagerevent-data title=dom-UndoManagerEvent-data>data</a>;
@@ -50979,7 +51227,7 @@
<div class=impl>
- <h4 id=implementation-notes><span class=secno>6.10.7 </span>Implementation notes</h4>
+ <h4 id=implementation-notes><span class=secno>6.11.7 </span>Implementation notes</h4>
<p>How user agents present the above conceptual model to the user is
not defined. The undo interface could be a filtered view of the
@@ -51002,7 +51250,7 @@
- <h3 id=editing-apis><span class=secno>6.11 </span>Editing APIs</h3>
+ <h3 id=editing-apis><span class=secno>6.12 </span>Editing APIs</h3>
<dl class=domintro><dt><var title="">document</var> . <code title=dom-document-execCommand><a href=#execCommand>execCommand</a></code>(<var title="">commandId</var> [, <var title="">showUI</var> [, <var title="">value</var> ] ] )</dt>
Modified: source
===================================================================
--- source 2009-05-02 21:34:09 UTC (rev 3064)
+++ source 2009-05-03 01:55:08 UTC (rev 3065)
@@ -8022,6 +8022,8 @@
attribute long <span title="dom-tabindex">tabIndex</span>;
void <span title="dom-focus">focus</span>();
void <span title="dom-blur">blur</span>();
+ attribute DOMString <span title="dom-accessKey">accessKey</span>;
+ readonly attribute DOMString <span title="dom-accessKeyLabel">accessKeyLabel</span>;
attribute boolean <span title="dom-draggable">draggable</span>;
attribute DOMString <span title="dom-contentEditable">contentEditable</span>;
readonly attribute boolean <span title="dom-isContentEditable">isContentEditable</span>;
@@ -8111,6 +8113,7 @@
defined in this specification)</span>:</p>
<ul class="brief">
+ <li><code title="attr-accesskey">accesskey</code></li>
<li><code title="attr-class">class</code></li>
<li><code title="attr-contenteditable">contenteditable</code></li>
<li><code title="attr-contextmenu">contextmenu</code></li>
@@ -44358,6 +44361,11 @@
represents the action. A command might not have an Icon.</dd> <!--
changing base URLs might change the icon -->
+ <dt><dfn title="command-facet-AccessKey">Access Key</dfn></dt>
+
+ <dd>A key combination selected by the user agent that triggers the
+ command. A command might not have an Access Key.</dd>
+
<dt><dfn title="command-facet-HiddenState">Hidden State</dfn></dt>
<dd>Whether the command is hidden or not (basically, whether it
@@ -44434,6 +44442,14 @@
</dd>
+ <dt><var title="">element</var> . <code title="dom-accessKeyLabel">accessKeyLabel</code></dt>
+
+ <dd>
+
+ <p>Exposes the <span title="command-facet-AccessKey">Access Key</span> facet of the command.</p>
+
+ </dd>
+
<dt><var title="">element</var> . <code title="dom-hidden">hidden</code></dt>
<dd>
@@ -44541,10 +44557,12 @@
<p class="note">The <span title="command-facet-ID">ID</span> facet
is exposed by the the <code title="dom-id">id</code> DOM attribute,
the <span title="command-facet-Hint">Hint</span> facet is exposed by
- the <code title="dom-title">title</code> DOM attribute, and the
- <span title="command-facet-HiddenState">Hidden State</span> facet is
- exposed by the <code title="dom-hidden">hidden</code> DOM
- attribute.</p>
+ the <code title="dom-title">title</code> DOM attribute, the <span
+ title="command-facet-AccessKey">AccessKey</span> facet is exposed by
+ the <code title="dom-accessKeyLabel">accessKeyLabel</code> DOM
+ attribute, and the <span title="command-facet-HiddenState">Hidden
+ State</span> facet is exposed by the <code
+ title="dom-hidden">hidden</code> DOM attribute.</p>
</div>
@@ -44572,8 +44590,17 @@
</div>
+ <hr>
+ <p>User agents may expose the <span
+ title="concept-command">commands</span> whose <span
+ title="command-facet-HiddenState">Hidden State</span> facet is false
+ (visible), e.g. in the user agent's menu bar. User agents are
+ encouraged to do this especially for commands that have <span
+ title="command-facet-AccessKey">Access Keys</span>, as a way to
+ advertise those keys to the user.</p>
+
<div class="impl">
<h5><dfn title="a-command">Using the <code>a</code> element to define a command</dfn></h5>
@@ -44608,6 +44635,10 @@
successful. Otherwise, there is no <span
title="command-facet-Icon">Icon</span> for the command.</p>
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>, if
+ any.</p>
+
<p>The <span title="command-facet-HiddenState">Hidden State</span>
of the command is true (hidden) if the element has a <code
title="attr-hidden">hidden</code> attribute, and false
@@ -44635,6 +44666,7 @@
title="command-facet-Label">Label</span>, <span
title="command-facet-Hint">Hint</span>, <span
title="command-facet-Icon">Icon</span>, <span
+ title="command-facet-AccessKey">Access Key</span>, <span
title="command-facet-HiddenState">Hidden State</span>, <span
title="command-facet-CheckedState">Checked State</span>, and <span
title="command-facet-Action">Action</span> facets of the command are
@@ -44684,7 +44716,7 @@
control</span>, the <code>textContent</code> of the first
<code>label</code> element in <span>tree order</span> whose
<span>labeled control</span> is the element in question is the <span
- title="command-facet-Label">Label</span> (in DOM terms, this the
+ title="command-facet-Label">Label</span> (in DOM terms, this is the
string given by <code><var
title="">element</var>.labels[0].textContent</code>). Otherwise,
the value of the <code title="attr-input-value">value</code>
@@ -44701,6 +44733,10 @@
<p>There is no <span title="command-facet-Icon">Icon</span> for the
command.</p>
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>, if
+ any.</p>
+
<p>The <span title="command-facet-HiddenState">Hidden State</span>
of the command is true (hidden) if the element has a <code
title="attr-hidden">hidden</code> attribute, and false
@@ -44758,6 +44794,10 @@
<p>There is no <span title="command-facet-Icon">Icon</span> for the
command.</p>
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>, if
+ any.</p>
+
<p>The <span title="command-facet-HiddenState">Hidden State</span>
of the command is true (hidden) if the element has a <code
title="attr-hidden">hidden</code> attribute, and false
@@ -44821,6 +44861,10 @@
successful. Otherwise, there is no <span
title="command-facet-Icon">Icon</span> for the command.</p>
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>, if
+ any.</p>
+
<p>The <span title="command-facet-HiddenState">Hidden State</span>
of the command is true (hidden) if the element has a <code
title="attr-hidden">hidden</code> attribute, and false
@@ -44880,6 +44924,10 @@
appropriate for the <code>bb</code> element's <code
title="attr-bb-type">type</code> attribute's state.</p>
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>, if
+ any.</p>
+
<p>The <span title="command-facet-HiddenState">Hidden State</span>
facet of the command is true (hidden) if the <code>bb</code>
element's <code title="attr-bb-type">type</code> attribute's state
@@ -44900,6 +44948,72 @@
element's <code title="attr-bb-type">type</code> attribute's
state.</p>
+
+ <h5><dfn title="accesskey-command">Using the <code title="attr-accesskey">accesskey</code> attribute to define a command</dfn></h5>
+
+ <p>An element that is <span>focusable</span>, has an <span>assigned
+ access key</span>, and is neither an <code>a</code> element with an
+ <code title="attr-a-href">href</code> attribute, a
+ <code>button</code> element, an <code>input</code> element whose
+ attribute is in one of the <span
+ title="attr-input-type-submit">Submit Button</span>, <span
+ title="attr-input-type-reset">Reset Button</span>, <span
+ title="attr-input-type-button">Button</span>, <span
+ title="attr-input-type-radio">Radio Button</span>, or <span
+ title="attr-input-type-checkbox">Checkbox</span> states, an
+ <code>option</code> element with an ancestor <code>select</code>
+ element and either no <code title="attr-option-value">value</code>
+ attribute or a <code title="attr-option-value">value</code>
+ attribute that is not the empty string, a <code>command</code>
+ element, nor a <code>bb</code> element, <span
+ title="concept-command">defines a command</span>.</p>
+
+ <p>The <span title="command-facet-Type">Type</span> of the command
+ is "command".</p>
+
+ <p>The <span title="command-facet-ID">ID</span> of the command is
+ the value of the <code title="attr-id">id</code> attribute of the
+ element, if the attribute is present and not empty. Otherwise the
+ command is an <span>anonymous command</span>.</p>
+
+ <p>The <span title="command-facet-Label">Label</span> of the command
+ depends on the element. If the element is a <span>labeled
+ control</span>, the <code>textContent</code> of the first
+ <code>label</code> element in <span>tree order</span> whose
+ <span>labeled control</span> is the element in question is the <span
+ title="command-facet-Label">Label</span> (in DOM terms, this is the
+ string given by <code><var
+ title="">element</var>.labels[0].textContent</code>). Otherwise, the
+ <span title="command-facet-Label">Label</span> is the
+ <code>textContent</code> of the element itself.</p>
+
+ <p>The <span title="command-facet-Hint">Hint</span> of the command
+ is the value of the <code title="attr-title">title</code> attribute
+ of the element. If the attribute is not present, the <span
+ title="command-facet-Hint">Hint</span> is the empty string.</p>
+
+ <p>There is no <span title="command-facet-Icon">Icon</span> for the
+ command.</p>
+
+ <p>The <span title="command-facet-AccessKey">AccessKey</span> of the
+ command is the element's <span>assigned access key</span>.</p>
+
+ <p>The <span title="command-facet-HiddenState">Hidden State</span>
+ of the command is true (hidden) if the element has a <code
+ title="attr-hidden">hidden</code> attribute, and false
+ otherwise.</p>
+
+ <p>The <span title="command-facet-DisabledState">Disabled
+ State</span> facet of the command is always false. (The command is
+ always enabled.)</p>
+
+ <p>The <span title="command-facet-CheckedState">Checked State</span>
+ of the command is always false. (The command is never checked.)</p>
+
+ <p>The <span title="command-facet-Action">Action</span> of the
+ command is to run the <span>focusing steps</span> for the
+ element.</p>
+
</div>
@@ -56129,6 +56243,8 @@
and submit respectively. Only their presentation to the user
changes.</p>
+ <div class="impl">
+
<!-- XXX might be worth disabling user interaction event submission
in hidden areas? e.g. make onmousemove and onclick and form controls
not respond to input? -->
@@ -56137,8 +56253,10 @@
attribute must <span>reflect</span> the content attribute of the
same name.</p>
+ </div>
+
<h3>Activation</h3>
<!-- v2 idea: HTMLImageElement.click(x, y); or clickPoint(), if
@@ -56672,6 +56790,168 @@
+
+
+ <h3>The <dfn title="attr-accesskey"><code>accesskey</code></dfn> attribute</h3>
+
+ <p>All elements may have the <code
+ title="attr-accesskey">accesskey</code> content attribute set. The
+ <code title="attr-accesskey">accesskey</code> attribute's value is
+ used by the user agent as a guide for creating a keyboard shortcut
+ that activates or focuses the element.</p>
+
+ <p>If specified, the value must be an <span>ordered set of unique
+ space-separated tokens</span>, each of which must be exactly one
+ Unicode code point in length.</p>
+
+ <div class="impl">
+
+ <p>An element's <dfn>assigned access key</dfn> is a key combination
+ derived from the element's <code
+ title="attr-accesskey">accesskey</code> content attribute as
+ follows:</p>
+
+ <ol>
+
+ <li><p>If the element has no <code
+ title="attr-accesskey">accesskey</code> attribute, then the element
+ has no <span>assigned access key</span>.</p></li>
+
+ <li><p>Otherwise, the user agent must must <span title="split a
+ string on spaces">split the attribute's value on spaces</span>, and
+ let <var title="">keys</var> be the resulting tokens.</p></li>
+
+ <li>
+
+ <p>For each value in <var title="">keys</var> in turn, in the
+ order the tokens appeared in the attribute's value, run the
+ following substeps:</p>
+
+ <ol>
+
+ <li><p>If the value is not a string exactly one Unicode code
+ point in length, then skip the remainder of these steps for this
+ value.</p></li>
+
+ <li><p>If the value does not correspond to a key on the system's
+ keyboard, then skip the remainder of these steps for this
+ value.</p></li>
+
+ <li><p>If the user agent can find a combination of modifier keys
+ that, with the key that corresponds to the value given in the
+ attribute, can be used as a shortcut key, then the user agent may
+ assign that combination of keys as the element's <span>assigned
+ access key</span> and abort these steps.</p></li>
+
+ </ol>
+
+ </li>
+
+ <li><p>If none of the values (if any) result in an access key being
+ assigned, then the element has no <span>assigned access
+ key</span>.</p></li>
+
+ </ol>
+
+ <p>Once a user agent has selected and assigned an access key for an
+ element, the user agent should not change the element's
+ <span>assigned access key</span> unless the <code
+ title="attr-accesskey">accesskey</code> content attribute is changed
+ or the element is moved to another <code>Document</code>.</p>
+
+ <p>When the user presses the key combination corresponding to the
+ <span>assigned access key</span> for an element, if the element
+ <span title="concept-command">defines a command</span>, the user
+ agent must trigger the <span
+ title="command-facet-Action">Action</span> of the command.</p>
+
+ <p>User agents may expose elements that have an <code
+ title="attr-accesskey">accesskey</code> attribute in other ways as
+ well, e.g. in a menu displayed in response to a specific key
+ combination.</p>
+
+ </div>
+
+ <div class="impl">
+
+ <p>The <dfn title="dom-accessKey"><code>accessKey</code></dfn> DOM
+ attribute must <span>reflect</span> the <code
+ title="attr-accesskey">accesskey</code> content attribute.</p>
+
+ <p>The <dfn
+ title="dom-accessKeyLabel"><code>accessKeyLabel</code></dfn> DOM
+ attribute must return a string that represents the element's
+ <span>assigned access key</span>, if any. If the element does not
+ have one, then the DOM attribute must return the empty string.</p>
+
+ </div>
+
+ <div class="example">
+
+ <p>In the following example, a variety of links are given with
+ access keys so that keyboard users familiar with the site can
+ more quickly navigate to the relevant pages:</p>
+
+ <pre><nav>
+ <p>
+ <a title="Consortium Activities" accesskey="A" href="/Consortium/activities">Activities</a> |
+ <a title="Technical Reports and Recommendations" accesskey="T" href="/TR/">Technical Reports</a> |
+ <a title="Alphabetical Site Index" accesskey="S" href="/Consortium/siteindex">Site Index</a> |
+ <a title="About This Site" accesskey="B" href="/Consortium/">About Consortium</a> |
+ <a title="Contact Consortium" accesskey="C" href="/Consortium/contact">Contact</a>
+ </p>
+</nav></pre>
+
+ </div>
+
+ <div class="example">
+
+ <p>In the following example, the search field is given two possible
+ access keys, "s" and "0" (in that order). A user agent on a device
+ with a full keyboard might pick
+ <kbd><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>S</kbd></kbd> as the
+ shortcut key, while a user agent on a small device with just a
+ numeric keypad might pick just the plain unadorned key
+ <kbd><kbd>0</kbd></kbd>:</p>
+
+ <pre><form action="/search">
+ <label>Search: <input type="search" name="q" accesskey="s 0"></label>
+ <input type="submit">
+</form></pre>
+
+ </div>
+
+ <div class="example">
+
+ <p>In the following example, a button has possible access keys
+ described. A script then tries to update the button's label to
+ advertise the key combination the user agent selected.</p>
+
+ <pre><input type=submit accesskey="N @ 1" value="Compose">
+...
+<script>
+ function labelButton(button) {
+ if (button.accessKeyLabel)
+ button.value += ' (' + button.accessKeyLabel + ')';
+ }
+ var inputs = document.getElementsByTagName('input');
+ for (var i = 0; i < inputs.length; i += 1) {
+ if (inputs[i].type == "submit")
+ labelButton(inputs[i]);
+ }
+</script></pre>
+
+ <p>On one user agent, the button's label might become
+ "<samp>Compose (⌘N)</samp>". On another, it might become
+ "<samp>Compose (Alt+⇧+1)</samp>". If the user agent doesn't
+ assign a key, it will be just "<samp>Compose</samp>". The exact
+ string depends on what the <span>assigned access key</span> is, and
+ on how the user agent represents that key combination.</p>
+
+ </div>
+
+
+
<h3 id="selection">The text selection APIs</h3>
<p>Every <span>browsing context</span> has <dfn title="the
More information about the Commit-Watchers
mailing list