mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Remove unused selectors for action menu
This change is a follow-up toaba11a7b1c
. Do not deploy this change until HTML cache from beforeaba11a7b1c
expired. Change-Id: I631260d58229b1b70e2d4e55f8302f9769de3511
This commit is contained in:
parent
aba11a7b1c
commit
5c363643a7
|
@ -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');
|
||||
}
|
||||
|
|
15
vector.js
15
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
|
||||
|
|
Loading…
Reference in a new issue