Closed Bug 856325 Opened 11 years ago Closed 11 years ago

[AccessFu] We do not support double-tap and hold in web content to bring up an item's context menu

Categories

(Core :: Disability Access APIs, defect)

ARM
Android
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla24
Tracking Status
firefox20 --- affected
firefox21 --- affected
firefox22 --- affected

People

(Reporter: MarcoZ, Assigned: maxli)

Details

Attachments

(1 file, 1 obsolete file)

STR:
0. Enable TalkBack.
1. Open any site.
2. Focus on a link.
3. Double-Tap, but don't lift your finger, but instead keep it on the display.

Expected: After a second or so, the item's context menu should appear.
Actual: Not half a second after the double-tap, TalkBack recognizes the finger on the display as an exploration touch instead of still belonging to the double-tap. There is no way to bring up the context menu.

This is not new in 22, I also reproduced this problem in 20. It prevents blind users from opening the context menu of a link, for example to save the link target etc.
Attached patch Patch (obsolete) — Splinter Review
Assignee: nobody → maxli
Attachment #756962 - Flags: review?(eitan)
I just tried this patch on a local build, and it works fine on Jelly Bean. :-)
Comment on attachment 756962 [details] [diff] [review]
Patch

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

I like the addition for TouchAdapter, very clean. A lot of this needs to be separated out into the content script, as I explain below.

::: accessible/src/jsat/AccessFu.jsm
@@ +661,5 @@
>      mm.sendAsyncMessage('AccessFu:Activate', {});
>    },
>  
> +  activateContextMenu: function activateContextMenu() {
> +    let accessible = Utils.getVirtualCursor(Utils.CurrentContentDoc).position;

As a rule, we don't access accessible objects directly in this script because we need to accommodate out-of-process content. So we typically send a message to the appropriate content script. In Android, we are all in-process, but we should still assume it is not so that if they "flip the switch" and change it to one process per tab, we would still work.

So you want to pass a message, like we do in activateCurrent, and then from the content script, send a message back here that would notify of a long press.

@@ +668,5 @@
> +    let x = objX.value + objW.value / 2;
> +    let y = objY.value + objH.value / 2;
> +
> +    Services.obs.notifyObservers(null, 'Gesture:LongPress',
> +                                 JSON.stringify({x: x, y: y}));

I think this is would only work in Android. In B2G, we would probably dispatch an IndieUI SecondaryAction event, but that should be left for future work.
Attachment #756962 - Flags: review?(eitan) → review-
Attached patch Patch v2Splinter Review
Attachment #756962 - Attachment is obsolete: true
Attachment #757637 - Flags: review?(eitan)
Comment on attachment 757637 [details] [diff] [review]
Patch v2

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

This looks good!
Attachment #757637 - Flags: review?(eitan) → review+
https://hg.mozilla.org/mozilla-central/rev/6fba29e7f379
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: