From: Timo Tijhof Date: Thu, 7 Jun 2018 13:14:47 +0000 (+0200) Subject: mediawiki.skinning: Remove styles for `#jump-to-nav` from core X-Git-Tag: 1.34.0-rc.0~5155 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=7fb5c9580d7add238d7a7f5275b1081b3e8b250b;p=lhc%2Fweb%2Fwiklou.git mediawiki.skinning: Remove styles for `#jump-to-nav` from core 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 `
`, 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 --- diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index ad62af43c9..4e2bdfae24 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -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 diff --git a/resources/Resources.php b/resources/Resources.php index b32bbcd78f..93ef4b1cc4 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -1708,7 +1708,6 @@ return [ 'dependencies' => [ 'jquery.accessKeyLabel', 'jquery.checkboxShiftClick', - 'jquery.mw-jump', ], 'targets' => [ 'desktop', 'mobile' ], ], diff --git a/resources/src/mediawiki.legacy/commonPrint.css b/resources/src/mediawiki.legacy/commonPrint.css index 64870fd8ca..eafa13d3dc 100644 --- a/resources/src/mediawiki.legacy/commonPrint.css +++ b/resources/src/mediawiki.legacy/commonPrint.css @@ -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 */ diff --git a/resources/src/mediawiki.legacy/shared.css b/resources/src/mediawiki.legacy/shared.css index 0f84ff1d83..83e0d8a984 100644 --- a/resources/src/mediawiki.legacy/shared.css +++ b/resources/src/mediawiki.legacy/shared.css @@ -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; diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less index d4ce55dcff..09d223e584 100644 --- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less +++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less @@ -136,6 +136,8 @@ 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; diff --git a/resources/src/mediawiki.skinning/interface.css b/resources/src/mediawiki.skinning/interface.css index f62cb97276..e9a2b08a89 100644 --- a/resources/src/mediawiki.skinning/interface.css +++ b/resources/src/mediawiki.skinning/interface.css @@ -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%; diff --git a/resources/src/mediawiki.special.preferences.styles.css b/resources/src/mediawiki.special.preferences.styles.css index 33b630a948..bdcfb79661 100644 --- a/resources/src/mediawiki.special.preferences.styles.css +++ b/resources/src/mediawiki.special.preferences.styles.css @@ -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; diff --git a/resources/src/mediawiki.special.preferences.styles.ooui.css b/resources/src/mediawiki.special.preferences.styles.ooui.css index a72186b4b8..4c5d34485b 100644 --- a/resources/src/mediawiki.special.preferences.styles.ooui.css +++ b/resources/src/mediawiki.special.preferences.styles.ooui.css @@ -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;