Bug 668469 - Don't ignore focusable elements. r=surkov
authorHubert Figuière <hfiguiere@mozilla.com>
Wed, 22 Aug 2012 08:08:43 -0700
changeset 105340 7055bd78827448669b53dc0dd1827cf477295cb2
parent 105339 600cc083dda03b846250bdd76c1bd0a3e8c6a159
child 105341 79345542f8535d29891b68397b7e7fc85b465fa4
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewerssurkov
bugs668469
milestone17.0a1
Bug 668469 - Don't ignore focusable elements. r=surkov
accessible/src/mac/mozAccessible.mm
--- a/accessible/src/mac/mozAccessible.mm
+++ b/accessible/src/mac/mozAccessible.mm
@@ -96,17 +96,18 @@ GetClosestInterestingAccessible(id anObj
 #pragma mark -
 
 - (BOOL)accessibilityIsIgnored
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN;
 
   // unknown (either unimplemented, or irrelevant) elements are marked as ignored
   // as well as expired elements.
-  return !mGeckoAccessible || [[self role] isEqualToString:NSAccessibilityUnknownRole];
+  return !mGeckoAccessible || ([[self role] isEqualToString:NSAccessibilityUnknownRole] &&
+                               !(mGeckoAccessible->NativeInteractiveState() & states::FOCUSABLE));
 
   NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(NO);
 }
 
 - (NSArray*)accessibilityAttributeNames
 {
   NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NIL;