Bug 1491744 - Give the More Actions button and popup menu in doorhanger notifications a better accessibility label, r=Gijs
authorMarco Zehe <mzehe@mozilla.com>
Mon, 17 Sep 2018 13:19:30 +0000
changeset 436720 2b62c236e468302ff31b4991d627f6115bd4c00c
parent 436719 d275273b389b0919c8425438f8e41db283368d19
child 436721 ec0977ff866d0964c93313297ffd74b7f5c7f0a7
push id69390
push usermzehe@mozilla.com
push dateMon, 17 Sep 2018 13:26:47 +0000
treeherderautoland@2b62c236e468 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1491744
milestone64.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 1491744 - Give the More Actions button and popup menu in doorhanger notifications a better accessibility label, r=Gijs When screen readers speak the button and subsequent menu when it pops up, the current full prompt is spoken by screen readers. This patch adds a localizable string that is spoken for both instances instead, but it not being displayed visually. This streamlines and improves the screen reader experience for this control and its menu popup a lot. Differential Revision: https://phabricator.services.mozilla.com/D5999
toolkit/content/widgets/notification.xml
toolkit/locales/en-US/chrome/global/notification.dtd
--- a/toolkit/content/widgets/notification.xml
+++ b/toolkit/content/widgets/notification.xml
@@ -528,19 +528,21 @@
         <children includes="button"/>
         <xul:button anonid="secondarybutton"
                     class="popup-notification-button"
                     xbl:inherits="oncommand=secondarybuttoncommand,label=secondarybuttonlabel,accesskey=secondarybuttonaccesskey,hidden=secondarybuttonhidden"/>
         <xul:toolbarseparator xbl:inherits="hidden=dropmarkerhidden"/>
         <xul:button anonid="menubutton"
                     type="menu"
                     class="popup-notification-button popup-notification-dropmarker"
+                    aria-label="&moreActionsButton.accessibleLabel;"
                     xbl:inherits="onpopupshown=dropmarkerpopupshown,hidden=dropmarkerhidden">
           <xul:menupopup anonid="menupopup"
                          position="after_end"
+                         aria-label="&moreActionsButton.accessibleLabel;"
                          xbl:inherits="oncommand=menucommand">
             <children/>
           </xul:menupopup>
         </xul:button>
         <xul:button anonid="button"
                     class="popup-notification-button"
                     default="true"
                     label="&defaultButton.label;"
--- a/toolkit/locales/en-US/chrome/global/notification.dtd
+++ b/toolkit/locales/en-US/chrome/global/notification.dtd
@@ -5,8 +5,10 @@
 <!ENTITY closeNotification.tooltip "Close this message">
 
 <!ENTITY checkForUpdates "Check for updates…">
 
 <!ENTITY learnMore "Learn more…">
 
 <!ENTITY defaultButton.label "OK!">
 <!ENTITY defaultButton.accesskey "O">
+
+<!ENTITY moreActionsButton.accessibleLabel "More actions">