From ba7b6d7c5bc5cd19eedd20e0df49725e2b04437f Mon Sep 17 00:00:00 2001 From: "sayrer%gmail.com" Date: Mon, 22 May 2006 21:28:27 +0000 Subject: [PATCH] b=338874. Safe browsing alert not exposed to screenreader. Patch by pilgrim@gmail.com. r=tony, sr=darin --- .../safebrowsing/content/phishing-afterload-displayer.js | 4 ++++ browser/components/safebrowsing/content/warning-overlay.xul | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/browser/components/safebrowsing/content/phishing-afterload-displayer.js b/browser/components/safebrowsing/content/phishing-afterload-displayer.js index 8ee7d00c4e8..75de3d69ad7 100644 --- a/browser/components/safebrowsing/content/phishing-afterload-displayer.js +++ b/browser/components/safebrowsing/content/phishing-afterload-displayer.js @@ -505,6 +505,7 @@ PROT_PhishMsgDisplayerCanvas.prototype.showMessage_ = function() { // 4. unhide stack contents // 5. display to the canvas // 6. unhide the warning message + // 7. focus the warning message // (1) // We add the canvas dynamically and remove it when we're done because @@ -563,6 +564,9 @@ PROT_PhishMsgDisplayerCanvas.prototype.showMessage_ = function() { tail.hidden = false; tail.style.display = "block"; this.adjustLocation_(message, tail, refElement); + + // (7) + this.doc_.getElementById(this.messageContentId_).focus(); } /** diff --git a/browser/components/safebrowsing/content/warning-overlay.xul b/browser/components/safebrowsing/content/warning-overlay.xul index f574eb034e1..f497bfd2ca0 100644 --- a/browser/components/safebrowsing/content/warning-overlay.xul +++ b/browser/components/safebrowsing/content/warning-overlay.xul @@ -34,7 +34,11 @@ + class="safebrowsing-palm-fixed-width safebrowsing-palm-message-bubble" + style="-moz-user-focus: normal" + xmlns:x2="http://www.w3.org/TR/xhtml2" + xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/GUIRoleTaxonomy#" + x2:role="wairole:alert">