Bug 1618719 - Support aria radio groups. r=morgan
authorEitan Isaacson <eitan@monotonous.org>
Wed, 11 Mar 2020 22:54:37 +0000
changeset 518278 28a6cdfc84067f11f84fd6cc35e9996bdd4ce477
parent 518277 743667e67c249057c3e16d6a9de675b65c7b7118
child 518279 4fd5c458be4c3bc2d1f22bd575667104a5d173fe
push id37206
push useraciure@mozilla.com
push dateThu, 12 Mar 2020 03:57:49 +0000
treeherdermozilla-central@4fd5c458be4c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmorgan
bugs1618719
milestone76.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 1618719 - Support aria radio groups. r=morgan Differential Revision: https://phabricator.services.mozilla.com/D66337
accessible/mac/mozAccessible.mm
--- a/accessible/mac/mozAccessible.mm
+++ b/accessible/mac/mozAccessible.mm
@@ -504,29 +504,29 @@ static inline NSMutableArray* ConvertToN
    *   ... return its name as a label (AXDescription).
    */
   if (accWrap) {
     ENameValueFlag flag = accWrap->Name(name);
     if (flag == eNameFromSubtree) {
       return nil;
     }
 
-    if (mRole != roles::GROUPING) {
+    if (mRole != roles::GROUPING && mRole != roles::RADIO_GROUP) {
       Relation rel = accWrap->RelationByType(RelationType::LABELLED_BY);
       if (rel.Next() && !rel.Next()) {
         return nil;
       }
     }
   } else if (proxy) {
     uint32_t flag = proxy->Name(name);
     if (flag == eNameFromSubtree) {
       return nil;
     }
 
-  if (mRole != roles::GROUPING) {
+    if (mRole != roles::GROUPING && mRole != roles::RADIO_GROUP) {
       nsTArray<ProxyAccessible*> rels = proxy->RelationByType(RelationType::LABELLED_BY);
       if (rels.Length() == 1) {
         return nil;
       }
     }
   }
 
   return nsCocoaUtils::ToNSString(name);
@@ -970,17 +970,17 @@ struct RoleDescrComparator {
 
   return NSAccessibilityRoleDescription([self role], subrole);
 }
 
 - (NSString*)title {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;
 
   // If this is a grouping we provide the name in the label (AXDescription).
-  if (mRole == roles::GROUPING) {
+  if (mRole == roles::GROUPING || mRole == roles::RADIO_GROUP) {
     return nil;
   }
 
   nsAutoString title;
   if (AccessibleWrap* accWrap = [self getGeckoAccessible])
     accWrap->Name(title);
   else if (ProxyAccessible* proxy = [self getProxyAccessible])
     proxy->Name(title);