Help:Keyboard Shortcuts: Difference between revisions

Content deleted Content added
Created page with "{{Short description|Keyboard shortcuts that work on all Wikimedia projects}}<templatestyles src="Wikipedia:Keyboard shortcuts/styles.css" /> The MediaWiki software contains many keyboard shortcuts. You can use them to access certain features of Wikipedia more quickly. == Using access keys == An access key allows a computer user to immediately jump to a specific part of a web page via the keyboard. On Wikipedia, access keys allow you to do a lot more—protect a page, s..."
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
 
(9 intermediate revisions by the same user not shown)
Line 1:
{{See also|Help:VisualEditor shortcuts}}
{{Short description|Keyboard shortcuts that work on all Wikimedia projects}}<templatestyles src="Wikipedia:Keyboard shortcuts/styles.css" />
 
 
The MediaWiki software contains many keyboard shortcuts. You can use them to access certain features of Wikipedia more quickly.
Line 15 ⟶ 16:
| rowspan="4" | Google Chrome & Chromium<br>Opera 15+
| Windows
| rowspan="2" | hold {{keypresskey press|Alt}}<br/>hold {{keypresskey press|Alt|Shift|access key}}<br/>hold {{keypresskey press|Alt|Control|Shift|access key}}{{refn|For some keys (e.g., {{keypresskey press|r}}), both {{keypresskey press|Alt}} and {{keypresskey press|Alt|Shift}} work; For other keys (e.g. {{keypresskey press|f}}), only {{keypresskey press|Alt|Shift}} works; For other keys (e.g. {{keypresskey press|.}}), only {{keypresskey press|Alt}} works.}}
|-
| Chrome OS
|-
| Linux
| hold {{keypresskey press|Alt|Shift|access key}}</br> hold {{keypresskey press|Alt|access key}}
|-
| macOS
| hold {{keypresskey press|Control|Option|access key}}
|-
| rowspan="2" | [[Firefox]]
| Windows, Linux
| hold {{keypresskey press|Alt|Shift|access key}}
|-
| macOS
| hold {{keypresskey press|Control|Option|access key}}
|-
| [[Internet Explorer]]<br>[[Microsoft Edge|MS Edge]]
| Windows
| hold {{keypresskey press|Alt|access key}} {{refn|in some versions you may then need to press {{keypresskey press|Enter}}}}
|-
| rowspan="2" | [[Safari (web browser)|Safari]]
| macOS
| hold {{keypresskey press|Control|Option|access key}}
|-
| Windows
| hold {{keypresskey press|Alt|access key}}
|}
 
{{collapse|
* [[Mozilla Firefox]] 1.5 on [[Microsoft Windows|Windows]]: hold {{keypresskey press|Alt}}, press access key
* [[Mozilla Firefox]] before version 14 on [[Mac OS X]]: hold {{keypresskey press|Control}}, press access key
* [[Safari (web browser)|Safari]] 3 or earlier on [[Mac OS X]]: hold {{keypresskey press|Control}}, press access key
* [[Camino (browser)|Camino]] ([[Mac OS X]]): hold {{keypresskey press|Control}}, press access key
* [[Opera (web browser)|Opera]] 12 and lower: press and release {{keypresskey press|Shift|Esc}}, then press access key
|title = Older browsers
|bg = #f2f2f2
Line 99 ⟶ 100:
|+ Current page tools
! scope="row" style="width: 2em;" | e
| Edit this page / view source (if you are [[WP:BLOCK|blocked]] or the page is protected from editing)
|-
! scope="row" | v
| Edit with [[w:VisualEditor|VisualEditor]] (if available, namespace must be: [[WP:Article|(Main)]], [[WP:File|File]], [[WP:User|User]], [[WP:Category|Category]], or [[WP:Help|Help]])
|-
! scope="row" | g
| Open associated [[wikidata:|Wikidata]] item
|-
! scope="row" | h
| [[Help:View history|View history]]
|-
! scope="row" | j
| [[Special:Whatlinkshere|What links here]]
|-
! scope="row" | k
Line 227 ⟶ 228:
|-
! scope="row" style="width: 2em;" | e
| Edit this page / view source (if you are [[WP:BLOCK|blocked]] or the page is protected from editing)
| Current page tools
|-
! scope="row" | v
| Edit with [[w:VisualEditor|VisualEditor]] (if available, namespace must be: [[WP:Article|(Main)]], [[WP:File|File]], [[WP:User|User]], [[WP:Category|Category]] or [[WP:Help|Help]])
| Current page tools
|-
! scope="row" | g
| Open associated [[wikidata:|Wikidata]] item
| Current page tools
|-
! scope="row" | h
| [[Help:View history|View history]]
| Current page tools
|-
! scope="row" | j
| [[Special:Whatlinkshere|What links here]]
| Current page tools
|-
Line 314 ⟶ 315:
| Admin only
|}
 
== Display access keys ==
By modifying [[Special:Mypage/common.css|your user CSS file]], access key shortcuts can be displayed before internal links on any Wikipedia page.
 
{{hidden|CSS with shortcuts shown on hover|headerstyle=background:#ccccff|content=
[[File:Access_keys_shortcut_display_on_hover.webm|thumb|right|x90px|Play the video to see how this CSS snippet works. The skin used here is Vector, but this will work for any skin.]]
<syntaxhighlight lang="css">a:hover[accesskey]:before {
content: " " attr(accesskey) " ";
text-transform: uppercase;
white-space: pre;
font-family: sans-serif;
margin-right: 0.5ex;
color: black;
}
</syntaxhighlight>
}}
{{hidden|CSS with shortcuts shown always|headerstyle=background:#ccccff|content=
[[File:Access_keys_shortcut_display_with_no_box.png|thumb|right|900px|Adding this code displays the access keys on every Wikipedia page, as shown in this picture.]]
<syntaxhighlight lang="css">a[accesskey]:before {
content: " " attr(accesskey) " ";
text-transform: uppercase;
white-space: pre;
font-family: sans-serif;
margin-right: 0.5ex;
color: black;
}
</syntaxhighlight>
}}
{{hidden|CSS with shortcuts shown always with a box|headerstyle=background:#ccccff|content=
[[File:Access_keys_shortcut_display_with_box.png|thumb|right|900px|This is identical to the above code except the access keys are displayed with boxes around them.]]
<syntaxhighlight lang="css">
a[accesskey]:before {
content: " " attr(accesskey) " ";
text-transform: uppercase;
white-space: pre;
border: thin solid;
font-family: sans-serif;
text-decoration: underline overline;
margin-right: 0.5ex;
color: black;
}
</syntaxhighlight>
}}
{{strong|This will not work in [[Internet Explorer]] versions lower than 8.0, since those browsers do not support the CSS selector used in these examples.}}
 
{{strong|This also will not display the accesskeys provided by the VisualEditor (or the [[mw:2017 wikitext editor]]), such as '<kbd>s</kbd>' to publish the page, as those accesskeys are implemented differently.}}
 
== Accessibility of access keys ==
{{update section}}<!--see https://www.mediawiki.org/w/index.php?title=Topic:Uuzp0ij8mnzoq1t2&topic_showPostId=x475fxqhgee13yqa&fromnotif=1#flow-post-x475fxqhgee13yqa-->
{{Wikipedia:WikiProject Accessibility/Navigation menu|impaired}}
Keyboard shortcuts, in the way they are implemented on Wikipedia, are useful for some users with disabilities and do not require JavaScript to work. At the same time, they are bothersome for some screen reader users because it interferes with the shortcuts of their screen reader. The best solution would be to have customizable keyboard shortcuts.
 
The accessibility of keyboard shortcuts (access keys) is a complicated matter. This feature, in its current implementation, was temporarily abandoned in [[WCAG]] 2.0, notably because it conflicts with the shortcuts of assistive technologies. Usage of access keys is currently discouraged in the online contents and applications.{{update-inline}}
 
But presence of access keys is also an [[Authoring Tool Accessibility Guidelines]] (ATAG) requirement—the ATAG approach is particularly relevant in Wikipedia's case—where this matter is looked into thoroughly. In particular, ATAG requires the possibility to customize shortcuts. This should be requested in [[phab:T2477]].
 
Currently, their presence in Wikipedia's interface can be problematic for some users and can be useful for others. But more importantly, it misleads developers into thinking that the interface is keyboard accessible. Requirements that need to be fulfilled for a website to be keyboard accessible are not related to keyboard shortcuts ([http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/G90 G90], [http://www.w3.org/TR/WCAG-TECHS/F42.html F42], [http://www.w3.org/TR/WCAG-TECHS/SCR35.html SCR35], [http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F58 F58], [http://www.w3.org/TR/2008/NOTE-WCAG20-TECHS-20081211/F61 F61]).
 
==Known issues: Gadgets which block keyboard shortcuts==
* Gadget [[User:Cacycle/wikEd|wikEd]] blocks keyboard shortcuts on Google Chrome and Firefox.
 
== User scripts that modify keyboard shortcuts ==
Some [[WP:User scripts|user scripts]] allow you to add more keyboard shortcuts for various actions or customize existing ones:
*{{userscript|doc=User:Enterprisey/up-one-lvl-kbd}} – The "U" keyboard shortcut now navigates up one subpage level.
*{{userscript|doc=User:Enterprisey/hover-edit-section}} – The "D" keyboard shortcut now edits the section you're hovering over.
*{{userscript|doc=User:Enterprisey/page-info-kbd-shortcut}} – The "I" keyboard shortcut now opens the "Page information" link in your sidebar.
*{{userscript|doc=User:Enterprisey/superjump}} – Custom keyboard shortcuts to go to any page.
*{{userscript|doc=User:Guarapiranga/accessKeysCheatSheet}} - The "?" keyboard shortcut now overlays a list of all keyboard shortcuts available on the current page.
 
== Disabling access keys ==
A [[MediaWiki:Gadget-removeAccessKeys.js|gadget]] exists that may be enabled to remove access key functionality. This may be opted in to using [[Special:Preferences#mw-prefsection-gadgets|Special:Preferences]]