mediawiki.skinning: Remove styles for `#jump-to-nav` from core
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 7 Jun 2018 13:14:47 +0000 (15:14 +0200)
committerKrinkle <krinklemail@gmail.com>
Thu, 7 Jun 2018 23:12:52 +0000 (23:12 +0000)
There are no longer any skins bundled with MediaWiki releases that
use it. Styling for this should be the skins' responsibility.

Vector and MonoBook no longer use this element, and core's
providing of these styles actually creates conflicts.

For skins using 'mediawiki.legacy.oldshared' (predating MonoBook),
no changes are required! Their jump-to-nav styles remain preserved.

For skins that use 'mediawiki.skinning.interface' and have
MonoBook-inspired accessibility links within a `<div id="#jump-to-nav">`,
need to make one of two changes:

1. Adopt the new CSS-only approach documented in T195256,
   as used by current MonoBook and Vector.

2. Or; Add a copy of the old CSS (included below) to your own skins'
   stylesheet and ensure the `jquery.mw-jump` module is loaded (previously
   by default), either by adding `$out->addModules( 'jquery.mw-jump' )`, or
   by adding it from the skin's Skin::getDefaultModules() override.

    @media screen {
        #jump-to-nav {
            /* Negate #contentSub margin */
            margin-top: -1.4em;
            margin-bottom: 1.4em;
            -moz-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        .mw-jump, #jump-to-nav {
            overflow: hidden;
            height: 0;
            zoom: 1;
        }
    }

    @media print {
        .mw-jump, #jump-to-nav {
            display: none;
        }
    }

This migration guide will be added to the T195256 task description,
to which the release notes refer.

Bug: T195256
Change-Id: I84bcd23180b3d1fa541728989f44a376189df95d

RELEASE-NOTES-1.32
resources/Resources.php
resources/src/mediawiki.legacy/commonPrint.css
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
resources/src/mediawiki.skinning/interface.css
resources/src/mediawiki.special.preferences.styles.css
resources/src/mediawiki.special.preferences.styles.ooui.css

index ad62af4..4e2bdfa 100644 (file)
@@ -150,6 +150,12 @@ because of Phabricator reports.
   instead.
 * Support for ResourceLoaderModule::getModifiedTime() and getModifiedHash(),
   deprecated since 1.26, was removed. Use getDefinitionSummary() instead.
+* (T195256) Skins are recommended not to rely on JavaScript for the "mw-jump"
+  and "jump-to-nav" accessibility links. To this end, the "jquery.mw-jump"
+  is no longer loaded by default. The Vector and MonoBook skins have made a
+  minor change to implement the toggle feature with CSS instead. To restore
+  prior functionality, either explicitly load "jquery.mw-jump" in your skin
+  or refer to T195256 for details on how to make the same change.
 
 === Deprecations in 1.32 ===
 * Use of a StartProfiler.php file is deprecated in favour of placing
index b32bbcd..93ef4b1 100644 (file)
@@ -1708,7 +1708,6 @@ return [
                'dependencies' => [
                        'jquery.accessKeyLabel',
                        'jquery.checkboxShiftClick',
-                       'jquery.mw-jump',
                ],
                'targets' => [ 'desktop', 'mobile' ],
        ],
index 64870fd..eafa13d 100644 (file)
@@ -16,7 +16,6 @@
 .catlinks,
 .magnify,
 .mw-cite-backlink,
-.mw-jump,
 .mw-editsection,
 .mw-editsection-like,
 .mw-hidden-catlinks,
@@ -27,7 +26,6 @@
 /* Various content ids, in alphabetical order */
 #column-one,
 #footer-places,
-#jump-to-nav,
 #mw-navigation,
 #siteNotice,
 /* Deprecated, changed in core */
index 0f84ff1..83e0d8a 100644 (file)
@@ -697,14 +697,6 @@ table.floatleft {
        unicode-bidi: embed;
 }
 
-/* Accessibility */
-.mw-jump,
-#jump-to-nav {
-       overflow: hidden;
-       height: 0;
-       zoom: 1; /* http://webaim.org/techniques/skipnav/#iequirk */
-}
-
 /* Print footer should be hidden by default in screen. */
 .printfooter {
        display: none;
@@ -716,8 +708,7 @@ table.floatleft {
        z-index: 99;
 }
 
-.mw-editsection,
-#jump-to-nav {
+.mw-editsection {
        -moz-user-select: none;
        -webkit-user-select: none;
        -ms-user-select: none;
index d4ce55d..09d223e 100644 (file)
                display: none;
        }
 
+       // Why does rcfilters have a copy of this?
+       // TODO: Remove per T195256.
        #jump-to-nav {
                margin-top: -0.5em;
                margin-bottom: 0.5em;
index f62cb97..e9a2b08 100644 (file)
@@ -63,12 +63,6 @@ textarea {
        display: none;
 }
 
-#jump-to-nav {
-       /* Negate #contentSub's margin and replicate it so that the jump to links don't affect the spacing */
-       margin-top: -1.4em;
-       margin-bottom: 1.4em;
-}
-
 #contentSub,
 #contentSub2 {
        font-size: 84%;
index 33b630a..bdcfb79 100644 (file)
@@ -25,7 +25,6 @@
 
 /*
  * Hide, but keep accessible for screen-readers.
- * Like .mw-jump, #jump-to-nav from shared.css
  */
 .client-js .mw-navigation-hint {
        overflow: hidden;
index a72186b..4c5d344 100644 (file)
@@ -27,7 +27,6 @@
 
 /*
  * Hide, but keep accessible for screen-readers.
- * Like .mw-jump, #jump-to-nav from shared.css
  */
 .client-js .mw-navigation-hint {
        overflow: hidden;