Closed Bug 799043 Opened 7 years ago Closed 7 years ago

Accessibility for menu completely broken, only see a fraction of menu items

Categories

(Firefox for Android :: General, defect, critical)

ARM
Android
defect
Not set
critical

Tracking

()

VERIFIED FIXED
Firefox 19
Tracking Status
firefox18 + fixed
firefox19 --- verified

People

(Reporter: MarcoZ, Assigned: sriram)

References

Details

(Keywords: access, regression)

Attachments

(1 file)

The accessibility of the menu is completely broken. STR:

1. On a Galaxy Nexus running Jelly Bean, open Nightly Firefox for Android.
2. Hit the Menu button.

Expected: Access to all menu items should be possible with TalkBack.
Actual: I see the back, forward, and reload buttons, but nothing else. No other menu item is accessible.

Whatever redesign happened to fit all items on one screen, it completely broke the accessibility of all except these three menu items!
Additional info: On a Nexus 7, I see no menu items whatsoever with TalkBack. TalkBack announces "list with 0 visible items".
Suspected regression from bug 785994.
Confirmed, although a conclusion *why* is not yet reached. The list appears empty to TalkBack. So the added items don't register.
Blocks: 785994
Sriram, assigning this bug to you as its suspected to be a regression from 785994, feel free to reassign if needed
Assignee: nobody → sriram
I'm investigating this as well.
So, the views have been made to be a listview instead a individual views in linearlayout. And on ICS/JB phones, the icons are a part of header of ListView. I am not sure how to register accessibility events for a ListView.

Please check /mobile/android/base/GeckoMenu.java for implementation.
(In reply to Sriram Ramasubramanian [:sriram] from comment #6)
> So, the views have been made to be a listview instead a individual views in
> linearlayout. And on ICS/JB phones, the icons are a part of header of
> ListView. I am not sure how to register accessibility events for a ListView.
> 
> Please check /mobile/android/base/GeckoMenu.java for implementation.

The issue are not the events (that look OK), the issue seems to be the AccessibilityNodeInfo that the listview returns. It shows no children, when the listview has 7 children (at least here). I am trying to figure out how it is determined that the children are not important for accessibility.

So far, I noticed that at the time when the AccessibilityNodeInfo is generated (via onInitializeAccessibilityNodeInfo), the children's getDrawingTime() returns 0. Which is fishy to me. The two possibilities i am investigating are:
1. Is the AccessibilityNodeInfo being generated too early?
2. Are the ListView/Adapter fully implemented.
After a day and a half of reading Android source code. I came across this fix. It makes sure that child views are properly added via addViewInLayout() and not assumed to be recycled and then just attached with attachViewToParent().
Attachment #669757 - Flags: review?(sriram)
Comment on attachment 669757 [details] [diff] [review]
Explicitly make GeckoMenu item views non-recycable.

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

Looks good to me.
Attachment #669757 - Flags: review?(sriram) → review+
Comment on attachment 669757 [details] [diff] [review]
Explicitly make GeckoMenu item views non-recycable.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 785994
User impact if declined: visually impaired users would no longer be able to use our menu system with the TalkBack screen reader.
Testing completed (on m-c, etc.): Yes, on a local build made from mozilla-inbound, will verify on Nightly once it gets merged to Central and a build with the fix made.
Risk to taking this patch (and alternatives if risky): Just adds a method to make sure the menu items are properly added, not just loosely attached, to the parent view.
String or UUID changes made by this patch: None.
Attachment #669757 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/df6c8f2abbc2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
Verified fixed in Firefox 19.0a1 (2012-10-12).
Status: RESOLVED → VERIFIED
Comment on attachment 669757 [details] [diff] [review]
Explicitly make GeckoMenu item views non-recycable.

Approves as this is verified on nightly as well :)
Attachment #669757 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.