Merge "Avoid using outdated $casToken field for BagOStuff calls"
[lhc/web/wiklou.git] / resources / src / mediawiki.special.preferences.ooui / tabs.js
index cc87f43..ffa9e42 100644 (file)
@@ -1,19 +1,22 @@
 /*!
  * JavaScript for Special:Preferences: Tab navigation.
  */
-( function ( mw, $ ) {
+( function () {
        $( function () {
                var $preferences, tabs, wrapper, previousTab, switchingNoHash;
 
                $preferences = $( '#preferences' );
 
-               // Make sure the accessibility tip is selectable so that screen reader users take notice,
+               // Make sure the accessibility tip is focussable so that keyboard users take notice,
                // but hide it by default to reduce visual clutter.
                // Make sure it becomes visible when focused.
                $( '<div>' ).addClass( 'mw-navigation-hint' )
                        .text( mw.msg( 'prefs-tabs-navigation-hint' ) )
-                       .attr( 'tabIndex', 0 )
-                       .prependTo( '#mw-content-text' );
+                       .attr( {
+                               tabIndex: 0,
+                               'aria-hidden': 'true'
+                       } )
+                       .insertBefore( '.mw-htmlform-ooui-wrapper' );
 
                tabs = new OO.ui.IndexLayout( {
                        expanded: false,
                } );
 
        } );
-}( mediaWiki, jQuery ) );
+}() );