From 0ee8510ce7c8e3898030a2c8e0065767897bc2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 16 Jun 2017 19:12:08 +0200 Subject: [PATCH] Remove old selectors and JavaScript for dropdown menus Bug: T168080 Change-Id: I49006314d42a00818464a94412cb63190b59a99b --- components/tabs.less | 6 ++---- vector.js | 19 ------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/components/tabs.less b/components/tabs.less index 29d78afbc..ea5d82cde 100644 --- a/components/tabs.less +++ b/components/tabs.less @@ -167,8 +167,7 @@ div.vectorMenu h3 { } } -div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after, -div.vectorMenu.menuForceShow h3 span:after { +div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after { transform: scaleY( -1 ); } @@ -195,8 +194,7 @@ div.vectorMenu div.menu { z-index: 2; } -div.vectorMenu:hover div.menu, -div.vectorMenu.menuForceShow div.menu { +div.vectorMenu:hover div.menu { display: block; } // This is in a separate block, so that browsers supporting :hover but not :checked still apply the rule above diff --git a/vector.js b/vector.js index bc09430c5..dbb47de89 100644 --- a/vector.js +++ b/vector.js @@ -25,25 +25,6 @@ jQuery( function ( $ ) { */ $( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 ); - /** - * Dropdown menu accessibility - */ - $( 'div.vectorMenu' ).each( function () { - var $el = $( this ); - if ( $el.find( '.vectorMenuCheckbox' ).length ) { - return; - } - $el.find( '> h3 > span' ).parent() - .attr( 'tabindex', '0' ) - // For accessibility, show the menu when the h3 is clicked (bug 24298/46486) - .on( 'click keypress', function ( e ) { - if ( e.type === 'click' || e.which === 13 ) { - $el.toggleClass( 'menuForceShow' ); - e.preventDefault(); - } - } ); - } ); - // Bind callback functions to animate our drop down menu in and out // and then call the collapsibleTabs function on the menu $tabContainer