Bug 1376111 - Fix AXRoleDescription for ARIA heading role. r=MarcoZ
authorJoanmarie Diggs <jdiggs@igalia.com>
Mon, 26 Jun 2017 00:43:00 -0400
changeset 366105 a7effdfd856ad1a0c83cc421e83773b001fd7345
parent 366104 751b38c592b5c57d696945bfc9fd7b43c3b8e7aa
child 366106 c538aaac7e5d3d5195ef12fc4687fbc81335c2c8
push id91884
push userryanvm@gmail.com
push dateTue, 27 Jun 2017 00:01:11 +0000
treeherdermozilla-inbound@c538aaac7e5d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMarcoZ
bugs1376111
milestone56.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 1376111 - Fix AXRoleDescription for ARIA heading role. r=MarcoZ The AXRoleDescription should be "heading" not "AXHeading." Add a new localized string and use it for roles::HEADING.
accessible/mac/mozAccessible.mm
dom/locales/en-US/chrome/accessibility/mac/accessible.properties
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -972,16 +972,19 @@ struct RoleDescrComparator
   }
 };
 
 - (NSString*)roleDescription
 {
   if (mRole == roles::DOCUMENT)
     return utils::LocalizedString(NS_LITERAL_STRING("htmlContent"));
 
+  if (mRole == roles::HEADING)
+    return utils::LocalizedString(NS_LITERAL_STRING("heading"));
+
   NSString* subrole = [self subrole];
 
   if (subrole) {
     size_t idx = 0;
     if (BinarySearchIf(sRoleDescrMap, 0, ArrayLength(sRoleDescrMap),
                        RoleDescrComparator(subrole), &idx)) {
       return utils::LocalizedString(sRoleDescrMap[idx].description);
     }
--- a/dom/locales/en-US/chrome/accessibility/mac/accessible.properties
+++ b/dom/locales/en-US/chrome/accessibility/mac/accessible.properties
@@ -35,16 +35,19 @@ navigation =    navigation
 complementary = complementary
 content =       content
 main    =       main
 # The (spoken) role description for various WAI-ARIA roles
 alert       =      alert
 alertDialog =      alert dialog
 article     =      article
 document    =      document
+# The (spoken) role description for the WAI-ARIA heading role
+# https://w3c.github.io/aria/core-aam/core-aam.html#role-map-heading
+heading     =      heading
 log         =      log
 marquee     =      marquee
 math        =      math
 note        =      note
 region      =      region
 status      =      application status
 timer       =      timer
 tooltip     =      tooltip