Bug 1632981 - Hide focus rectangle on installing label. r=mhowell
authorAdam Gashlin <agashlin@mozilla.com>
Fri, 24 Apr 2020 20:57:35 +0000
changeset 526017 8e8278c2c5f1a2f856ce26337152289ad44f8769
parent 526016 72ed11f01cfde2de5b35909449244b725f2c901e
child 526018 58be148294115992361b6aea7bffa2b7987f283d
push id37348
push userrmaries@mozilla.com
push dateSat, 25 Apr 2020 09:49:23 +0000
treeherdermozilla-central@d8a8178627c4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhowell
bugs1632981
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1632981 - Hide focus rectangle on installing label. r=mhowell Differential Revision: https://phabricator.services.mozilla.com/D72460
browser/installer/windows/nsis/content/installing.js
browser/installer/windows/nsis/content/stub_common.css
--- a/browser/installer/windows/nsis/content/installing.js
+++ b/browser/installer/windows/nsis/content/installing.js
@@ -45,10 +45,14 @@ window.attachEvent("onload", function() 
   ];
   function rotateBlurb() {
     document.getElementById("blurb").innerText = blurbStrings[currentBlurb];
     currentBlurb = (currentBlurb + 1) % blurbStrings.length;
   }
   rotateBlurb();
   setInterval(rotateBlurb, BLURB_CYCLE_MS);
 
+  // Focus the label, in order to get the focus in the web page, to
+  // assist screen readers. On Win 7's IE8 this causes the focus rectangle
+  // to be immediately visible, so also hide that here.
+  label.className += " no-focus-outline";
   label.focus();
 });
--- a/browser/installer/windows/nsis/content/stub_common.css
+++ b/browser/installer/windows/nsis/content/stub_common.css
@@ -26,8 +26,12 @@ body {
   left: 0;
 
   z-index: -1;
 }
 
 body.high-contrast #background {
   display: none;
 }
+
+.no-focus-outline {
+  outline: none;
+}