Twenty Seventeen: Make sure skip link works in all versions of Internet Explorer

This also reduces the number of browsers detected and patched with this fix. Most modern browsers have patched this common bug, where an anchor link does not move focus when clicked. Twenty Seventeen will only worry about older versions of Internet Explorer in this regard.

Props afercia, sami.keijonen.

See #38604.

Built from https://develop.svn.wordpress.org/trunk@39135


git-svn-id: http://core.svn.wordpress.org/trunk@39075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
David A. Kennedy 2016-11-04 17:15:55 +00:00
parent abada1fbdc
commit 495b2d835f
3 changed files with 3 additions and 11 deletions

View File

@ -6,11 +6,9 @@
* Learn more: https://git.io/vWdr2
*/
( function() {
var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
isOpera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
isIe = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
var isIe = /(trident|msie)/i.test( navigator.userAgent );
if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
if ( isIe && document.getElementById && window.addEventListener ) {
window.addEventListener( 'hashchange', function() {
var id = location.hash.substring( 1 ),
element;

View File

@ -330,12 +330,6 @@ template {
z-index: 100000; /* Above WP toolbar. */
}
/* Do not show the outline on the skip link target. */
#content[tabindex="-1"]:focus {
outline: 0;
}
/*--------------------------------------------------------------
# Alignments
--------------------------------------------------------------*/

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-beta1-39134';
$wp_version = '4.7-beta1-39135';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.