Fix tabindex applied twice on RC top section
authorpetarpetkovic <ppetkovic@wikimedia.org>
Mon, 16 Oct 2017 13:42:03 +0000 (15:42 +0200)
committerpetarpetkovic <ppetkovic@wikimedia.org>
Mon, 16 Oct 2017 13:53:04 +0000 (15:53 +0200)
- Remove tabindex = 0 applied to ButtonElement and leave
only tabindex on ButtonElement-button, so keyboard focus
does not catch one time too much.

Bug: T175893
Change-Id: I5bf759dd2cdcb1a719f1ca7844253025813f8e9a

resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js

index ca76046..2c99d3d 100644 (file)
@@ -48,7 +48,8 @@
                                widget.switchTopLinks( 'collapsed' );
                        } );
 
-               this.$topLinks.find( '.mw-recentchanges-toplinks-title' ).replaceWith( toplinksTitle.$element );
+               this.$topLinks.find( '.mw-recentchanges-toplinks-title' )
+                       .replaceWith( toplinksTitle.$element.removeAttr( 'tabIndex' ) );
 
                // Create two positions for the toplinks to toggle between
                // in the table (first cell) or up above it