Merge "Remove unused selectors for action menu"

This commit is contained in:
jenkins-bot 2017-07-11 23:45:36 +00:00 committed by Gerrit Code Review
commit 40699a9a28
2 changed files with 4 additions and 14 deletions

View File

@ -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');
}

View File

@ -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