From 318b9027db03bc7397fa8072811db33783d29976 Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 21 Feb 2017 21:56:56 +0000 Subject: Bug 1280363 - [a11y] Make the Actions menu button accessible for keyboard and screen readers --- extensions/BugModal/web/dropdown.css | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 extensions/BugModal/web/dropdown.css (limited to 'extensions/BugModal/web/dropdown.css') diff --git a/extensions/BugModal/web/dropdown.css b/extensions/BugModal/web/dropdown.css new file mode 100644 index 000000000..977a7a57f --- /dev/null +++ b/extensions/BugModal/web/dropdown.css @@ -0,0 +1,52 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This Source Code Form is "Incompatible With Secondary Licenses", as + * defined by the Mozilla Public License, v. 2.0. */ + +/* The container
- needed to position the dropdown content */ +.dropdown { + position: relative; + display: inline-block; +} + +/* Dropdown Content (Hidden by Default) */ +.dropdown-content { + position: absolute; + background-color: #eee; + min-width: 120px; + z-index: 1; + text-align: left; + margin: 0; + padding: 0; + border: 1px solid #ddd; + -webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); + box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1); + list-style: none; +} + +.dropdown-content.menu-up { + bottom: 100%; +} + +.dropdown-separator { + border-bottom: 1px solid #ddd; +} + +/* Links inside the dropdown */ +.dropdown-content a { + white-space: nowrap; + background-color: #eee; + color: black !important; + padding: 4px 8px; + text-decoration: none !important; + display: block; +} + +/* Change color of dropdown links on hover */ +.dropdown-content li .active { + text-decoration: none; + background-color: #39f; +} -- cgit v1.2.3-24-g4f1b