Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 720651 of accesskey

  • Revision slug: Web/HTML/Global_attributes/accesskey
  • Revision title: accesskey
  • Revision id: 720651
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment Linkified global attribute

Revision Content

{{HTMLSidebar("Global_attributes")}}

The accesskey global attribute provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters (one single Unicode code point). The browser uses the first one that exists on the computer keyboard layout.

The operation to activate the accesskey depends on browser and its platform.

  Windows Linux Mac
Firefox AltShift key On Firefox 14 or newer, ControlAlt key
On Firefox 13 or older, Control key
Internet Explorer Alt key N/A
Google Chrome Alt key ControlAlt key
Safari Alt key N/A ControlAlt key
Opera ShiftEsc opens a contents list which are accessible by accesskey, then, can choose an item by pressing key

Note that Firefox can customize the required modifier key by user's preferences.

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', "interaction.html#the-accesskey-attribute", "accesskey")}} {{Spec2('HTML WHATWG')}} No change from latest snapshot, {{SpecName('HTML5.1')}}
{{SpecName('HTML5.1', "editing.html#the-accesskey-attribute", "accesskey")}} {{Spec2('HTML5.1')}} Snapshot of {{SpecName('HTML WHATWG')}}, no change from {{SpecName('HTML5 W3C')}}
{{SpecName('HTML5 W3C', "editing.html#the-accesskey-attribute", "accesskey")}} {{Spec2('HTML5 W3C')}} Snapshot of  {{SpecName('HTML WHATWG')}}. From {{SpecName('HTML4.01')}}, several characters can be set as the accesskey. Also, it can be set on any element.
{{SpecName('HTML4.01', "interact/forms.html#h-17.11.2", "accesskey")}} {{Spec2('HTML4.01')}} Only supported on {{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("label") }}, {{ HTMLElement("legend") }} and {{ HTMLElement("textarea") }}

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}

See also

Revision Source

<p class="note">{{HTMLSidebar("Global_attributes")}}</p>
<p class="note">The <strong>accesskey</strong> <a href="/en-US/docs/Web/HTML/Global_attributes">global attribute</a> provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters (one single Unicode code point). The browser uses the first one that exists on the computer keyboard layout.</p>
<p>The operation to activate the accesskey depends on browser and its platform.</p>
<table class="standard-table">
 <tbody>
  <tr>
   <th>&nbsp;</th>
   <th>Windows</th>
   <th>Linux</th>
   <th>Mac</th>
  </tr>
  <tr>
   <th>Firefox</th>
   <td colspan="2" rowspan="1"><kbd>Alt</kbd><kbd>Shift</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
   <td>On Firefox 14 or newer, <kbd>Control</kbd><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd><br />
    On Firefox 13 or older, <kbd>Control</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
  </tr>
  <tr>
   <th>Internet Explorer</th>
   <td><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
   <td colspan="2" rowspan="1">N/A</td>
  </tr>
  <tr>
   <th>Google Chrome</th>
   <td colspan="2" rowspan="1" style="text-align: center;"><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
   <td><kbd>Control</kbd><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
  </tr>
  <tr>
   <th>Safari</th>
   <td><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
   <td>N/A</td>
   <td><kbd>Control</kbd><kbd>Alt</kbd><kbd>
    <i>
     key</i>
    </kbd></td>
  </tr>
  <tr>
   <th>Opera</th>
   <td colspan="3" rowspan="1"><kbd>Shift</kbd><kbd>Esc</kbd> opens a contents list which are accessible by accesskey, then, can choose an item by pressing <kbd>
    <i>
     key</i>
    </kbd></td>
  </tr>
 </tbody>
</table>
<p>Note that Firefox can customize the required modifier key by user's preferences.</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('HTML WHATWG', "interaction.html#the-accesskey-attribute", "accesskey")}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td>No change from latest snapshot, {{SpecName('HTML5.1')}}</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5.1', "editing.html#the-accesskey-attribute", "accesskey")}}</td>
   <td>{{Spec2('HTML5.1')}}</td>
   <td>Snapshot of {{SpecName('HTML WHATWG')}}, no change from {{SpecName('HTML5 W3C')}}</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', "editing.html#the-accesskey-attribute", "accesskey")}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td>Snapshot of&nbsp; {{SpecName('HTML WHATWG')}}. From {{SpecName('HTML4.01')}}, several characters can be set as the <code>accesskey</code>. Also, it can be set on any element.</td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', "interact/forms.html#h-17.11.2", "accesskey")}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td>Only supported on {{ HTMLElement("a") }}, {{ HTMLElement("area") }}, {{ HTMLElement("button") }}, {{ HTMLElement("input") }}, {{ HTMLElement("label") }}, {{ HTMLElement("legend") }} and {{ HTMLElement("textarea") }}</td>
  </tr>
 </tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<p>{{CompatibilityTable}}</p>
<div id="compat-desktop">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Chrome</th>
    <th>Firefox (Gecko)</th>
    <th>Internet Explorer</th>
    <th>Opera</th>
    <th>Safari</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<div id="compat-mobile">
 <table class="compat-table">
  <tbody>
   <tr>
    <th>Feature</th>
    <th>Android</th>
    <th>Chrome for Android</th>
    <th>Firefox Mobile (Gecko)</th>
    <th>IE Mobile</th>
    <th>Opera Mobile</th>
    <th>Safari Mobile</th>
   </tr>
   <tr>
    <td>Basic support</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
    <td>{{CompatVersionUnknown}}</td>
   </tr>
  </tbody>
 </table>
</div>
<h2 id="See_also">See also</h2>
<ul>
 <li>All <a href="/en-US/docs/Web/HTML/Global_attributes">global attributes</a>.</li>
</ul>
Revert to this revision