From 91c215f9a7c5f1bd33eee4d8587bc80a92863071 Mon Sep 17 00:00:00 2001 From: Mike Greiling Date: Wed, 31 Aug 2016 20:58:58 -0500 Subject: make projects dropdown accessible --- app/assets/stylesheets/framework/header.scss | 4 ++++ app/helpers/projects_helper.rb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/framework/header.scss b/app/assets/stylesheets/framework/header.scss index 2b4fc0fb068..e981de241ce 100644 --- a/app/assets/stylesheets/framework/header.scss +++ b/app/assets/stylesheets/framework/header.scss @@ -160,11 +160,15 @@ header { } .dropdown-toggle-caret { + color: $gl-text-color; + border: transparent; + background: transparent; position: relative; top: -2px; width: 12px; line-height: 12px; margin-left: 5px; + padding: 0; font-size: 10px; text-align: center; cursor: pointer; diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f07077bd133..7a90a0bb465 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -61,7 +61,9 @@ module ProjectsHelper project_link = link_to simple_sanitize(project.name), project_path(project), { class: "project-item-select-holder" } if current_user - project_link << icon("chevron-down", class: "dropdown-toggle-caret js-projects-dropdown-toggle", aria: { label: "Toggle switch project dropdown" }, data: { target: ".js-dropdown-menu-projects", toggle: "dropdown" }) + project_link << button_tag(type: 'button', class: "dropdown-toggle-caret js-projects-dropdown-toggle", aria: { label: "Toggle switch project dropdown" }, data: { target: ".js-dropdown-menu-projects", toggle: "dropdown" }) do + icon("chevron-down") + end end full_title = "#{namespace_link} / #{project_link}".html_safe -- cgit v1.2.1