From 5c363643a7a5a52a54357b8afab7830e66a7b12a Mon Sep 17 00:00:00 2001 From: Fomafix Date: Tue, 6 Jun 2017 08:14:22 +0200 Subject: [PATCH] Remove unused selectors for action menu This change is a follow-up to aba11a7b1c. Do not deploy this change until HTML cache from before aba11a7b1c expired. Change-Id: I631260d58229b1b70e2d4e55f8302f9769de3511 --- components/tabs.less | 3 --- vector.js | 15 ++++----------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/components/tabs.less b/components/tabs.less index 9126a89ed..d93690340 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -153,7 +153,6 @@ div.vectorMenu h3 span { color: @menu-main-heading-color; } -div.vectorMenu h3 a, // FIXME: Remove selector in 1wk (T44241) div.vectorMenu h3 div { position: absolute; top: 0; @@ -166,12 +165,10 @@ div.vectorMenu h3 div { .transition(background-position 250ms); } -div.vectorMenu.menuForceShow h3 a, // FIXME: Remove selector in 1wk (T44241) div.vectorMenu.menuForceShow h3 div { background-position: 100% 100%; } -div.vectorMenuFocus h3 a, // FIXME: Remove selector in 1wk (T44241) div.vectorMenuFocus h3 div { .background-image-svg('images/arrow-down-focus-icon.svg', 'images/arrow-down-focus-icon.png'); } diff --git a/vector.js b/vector.js index 3f577e8f8..6e4a2a7d0 100644 --- a/vector.js +++ b/vector.js @@ -30,8 +30,7 @@ jQuery( function ( $ ) { */ $( 'div.vectorMenu' ).each( function () { var $el = $( this ); - // FIXME: Remove > a selector in 1wk (T44241) - $el.find( '> h3 > div, > h3 > a' ).parent() + $el.find( '> h3 > div' ).parent() .attr( 'tabindex', '0' ) // For accessibility, show the menu when the h3 is clicked (bug 24298/46486) .on( 'click keypress', function ( e ) { @@ -42,17 +41,11 @@ jQuery( function ( $ ) { } ) // When the heading has focus, also set a class that will change the arrow icon .focus( function () { - // FIXME: Remove > a selector in 1wk (T44241) - $el.find( '> div, > a' ).addClass( 'vectorMenuFocus' ); + $el.find( '> div' ).addClass( 'vectorMenuFocus' ); } ) .blur( function () { - // FIXME: Remove > a selector in 1wk (T44241) - $el.find( '> div, > a' ).removeClass( 'vectorMenuFocus' ); - } ) - // FIXME: Remove > a selector in 1wk (T44241) - .find( '> a:first' ) - // As the h3 can already be focused there's no need for the link to be focusable - .attr( 'tabindex', '-1' ); + $el.find( '> div' ).removeClass( 'vectorMenuFocus' ); + } ); } ); // Bind callback functions to animate our drop down menu in and out