Closed Bug 1013006 Opened 6 years ago Closed 6 years ago

[AccessFu] isFlatSubtree returns false when there is an ancestor with a click listener

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

Even if it is a simple subtree with text leaves, if an ancestor has a click listener, the text leaves will have an actionCount of 1 (while their direct parent won't). So it is not enough to check for actionCount 0, we need to verify the role, and make sure they are not text leaves or static text.
Comment on attachment 8425164 [details] [diff] [review]
Ignore actionCount on text leaves when checking if the subtree is flat.

>+      // text leafs inherit the actionCount of any ancestor that has a click

Nit> Text leaves.

>+      if ([Roles.TEXT_LEAF, Roles.STATICTEXT].indexOf(child.role) >= 0) {

What the...

Umm...I mean, what kind of syntax is that? :-)
Comment on attachment 8425164 [details] [diff] [review]
Ignore actionCount on text leaves when checking if the subtree is flat.

Review of attachment 8425164 [details] [diff] [review]:
-----------------------------------------------------------------

Nice
Attachment #8425164 - Flags: review?(yzenevich) → review+
https://hg.mozilla.org/mozilla-central/rev/37e1dd2155b6
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.