} else {
// Note use of just `a`, not `a.image`, since we also want this to trigger if a link
// within the caption text receives focus.
- // This is based on code from the 'jquery.mw-jump' module.
$content.find( 'ul.mw-gallery-packed-hover li.gallerybox' ).on( 'focus blur', 'a', function ( e ) {
// Confusingly jQuery leaves e.type as focusout for delegated blur events
var gettingFocus = e.type !== 'blur' && e.type !== 'focusout';
$preferences = $( '#preferences' );
// Make sure the accessibility tip is selectable so that screen reader users take notice,
- // but hide it per default to reduce interface clutter. Also make sure it becomes visible
- // when selected. Similar to jquery.mw-jump
+ // 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 )
$fieldsets.children( 'legend' ).addClass( 'mainLegend' );
// Make sure the accessibility tip is selectable so that screen reader users take notice,
- // but hide it per default to reduce interface clutter. Also make sure it becomes visible
- // when selected. Similar to jquery.mw-jump
+ // 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 )