X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.widgets%2Fmw.widgets.TitleOptionWidget.js;h=3583e5ec9016b40f818735119af039bb59b76344;hb=0b88e6fb8c09f92ba5df941e0795121df76e8d9c;hp=84533aa957dc43b7daf9e8a06afc9bb7a34e3779;hpb=12e6fd1ec066237f9ed9fb1c8191c27a616e108b;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js index 84533aa957..3583e5ec90 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js @@ -51,6 +51,11 @@ this.$label.attr( 'href', config.url ); this.$element.addClass( 'mw-widget-titleOptionWidget' ); + // OOUI OptionWidgets make an effort to not be tab accessible, but + // adding a link inside them would undo that. So, explicitly make it + // not tabbable. + this.$label.attr( 'tabindex', '-1' ); + // Allow opening the link in new tab, but not regular navigation. this.$label.on( 'click', function ( e ) { // Don't interfere with special clicks (e.g. to open in new tab) @@ -60,7 +65,9 @@ } ); // Highlight matching parts of link suggestion - this.$label.autoEllipsis( { hasSpan: false, tooltip: true, matchText: config.query } ); + this.$label + .highlightText( config.query ) + .attr( 'title', config.data ); if ( config.missing ) { this.$label.addClass( 'new' );