From 0fddd3696887aa4c5e33d7b99be7441f3812503e Mon Sep 17 00:00:00 2001 From: Joel Verhagen Date: Thu, 10 Aug 2017 10:43:24 -0700 Subject: [PATCH] Fix two accessibility issues and fix hover underline on alerts (#4547) Enable "enter" key press on Upload button Make selected package command tab apparent on high-contrast Firefox Add `icon-text` class for text with an icon that is NOT a link (`icon-link` has other undesired rules) Fix accessibility issue 470376 Fix accessibility issue 476608 --- src/Bootstrap/dist/css/bootstrap-theme.css | 11 ++++------- src/Bootstrap/less/theme/base.less | 2 +- src/Bootstrap/less/theme/page-display-package.less | 9 ++------- src/NuGetGallery/App_Code/ViewHelpers.cshtml | 2 +- .../Content/gallery/css/bootstrap-theme.css | 11 ++++------- src/NuGetGallery/Views/Packages/UploadPackage.cshtml | 2 +- src/NuGetGallery/Views/Shared/_ListPackage.cshtml | 8 ++++---- 7 files changed, 17 insertions(+), 28 deletions(-) diff --git a/src/Bootstrap/dist/css/bootstrap-theme.css b/src/Bootstrap/dist/css/bootstrap-theme.css index 7c4cff53e9..8d0f20db6b 100644 --- a/src/Bootstrap/dist/css/bootstrap-theme.css +++ b/src/Bootstrap/dist/css/bootstrap-theme.css @@ -90,7 +90,8 @@ body h3 { .btn-search { height: 36px; } -.icon-link .ms-Icon { +.icon-link .ms-Icon, +.icon-text .ms-Icon { position: relative; top: 2px; } @@ -624,16 +625,12 @@ img.package-icon { border: 0; } .page-package-details .install-tabs .nav-tabs > li.active > a { + font-weight: 600; color: #fff; + text-decoration: underline; background-color: #002440; border: 0; } -@media screen and (-ms-high-contrast: active) { - .page-package-details .install-tabs .nav-tabs > li.active > a { - font-weight: 600; - text-decoration: underline; - } -} .page-package-details .install-tabs .tab-pane > div { display: table; height: 1px; diff --git a/src/Bootstrap/less/theme/base.less b/src/Bootstrap/less/theme/base.less index 69a127c24e..385eb506fd 100644 --- a/src/Bootstrap/less/theme/base.less +++ b/src/Bootstrap/less/theme/base.less @@ -114,7 +114,7 @@ body { height: 36px; } -.icon-link { +.icon-link, .icon-text { .ms-Icon { position: relative; top: 2px; diff --git a/src/Bootstrap/less/theme/page-display-package.less b/src/Bootstrap/less/theme/page-display-package.less index 212d1e5587..c7508f82e4 100644 --- a/src/Bootstrap/less/theme/page-display-package.less +++ b/src/Bootstrap/less/theme/page-display-package.less @@ -71,13 +71,8 @@ background-color: @panel-footer-bg; border: 0; color: #fff; - - @media screen and (-ms-high-contrast: active){ - & { - font-weight: 600; - text-decoration: underline; - } - } + font-weight: 600; + text-decoration: underline; } .tab-pane { diff --git a/src/NuGetGallery/App_Code/ViewHelpers.cshtml b/src/NuGetGallery/App_Code/ViewHelpers.cshtml index 662d699210..2e8b3747a1 100644 --- a/src/NuGetGallery/App_Code/ViewHelpers.cshtml +++ b/src/NuGetGallery/App_Code/ViewHelpers.cshtml @@ -40,7 +40,7 @@ @helper Alert(Func htmlContent, string subclass, string icon, bool isAlertRole = false) { -