Closed Bug 961540 Opened 11 years ago Closed 4 years ago

Provide accessibility events when any accessibility service is active

Categories

(Firefox for Android Graveyard :: General, enhancement)

All
Android
enhancement
Not set
normal

Tracking

(fennec-)

RESOLVED INCOMPLETE
Tracking Status
fennec - ---

People

(Reporter: veeti.paananen, Unassigned)

References

Details

(Keywords: access)

I am building an app that makes use of an Android accessibility service to capture TYPE_VIEW_TEXT_CHANGED events. Changing the text in HTML input fields does not fire them in Firefox for Android. All native input fields, WebView and Chrome do this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: access
tracking-fennec: --- → ?
Known issue?
Flags: needinfo?(eitan)
Veeti,

I think we intentionally suppress text changes that don't happen directly from user input. In other words, text changes done in js. Is that the case you are seeing? Does changing the text manually fire an event?
Flags: needinfo?(eitan)
OK, so I took a look at the source and it looks like there's some sort of whitelist for accessibility services in GeckoAccessibility. Because of this, no events are being sent.

Adding my service to the list makes input reporting work fine, but at the same time enables all sorts of other accessibility stuff that basically breaks the browser (I guess it's expecting a full screen reader to allow navigation, which I am not working on).

Perhaps it could be modified to always dispatch events, but keep the "rest of accessibility" to just the whitelist? I tried just naively removing the sEnabled check from sendAccessibilityEvent but that doesn't seem to be enough.
(In reply to Veeti Paananen from comment #3)
> OK, so I took a look at the source and it looks like there's some sort of
> whitelist for accessibility services in GeckoAccessibility. Because of this,
> no events are being sent.
> 
> Adding my service to the list makes input reporting work fine, but at the
> same time enables all sorts of other accessibility stuff that basically
> breaks the browser (I guess it's expecting a full screen reader to allow
> navigation, which I am not working on).

Correct. For full context of why that whitelist is there see bug #779096. When Firefox detects an accessibility service it does more than simply emitting events. It goes into "screen reader mode". Since there are plenty of apps out there that use the accessibility API for simple automation tasks that are unrelated to actual accessibility, we created a whitelist of "legitimate" services.

For your app to work correctly we would need some intermediate mode that enables a11y events, but does not change the interaction model.
Eitan, I assume you're going to resolve this as invald. If not, please renom and explain
tracking-fennec: ? → -
When a non-whitelisted service is present, we should still be emitting accessibility events without activating our baked-in a11y-centric input mode. This will allow more general purpose accessibility services to get what they need. 

The NotificationListenerService introduced in API 18 was introduced so that notification enhancing apps don't exploit the a11y API for non-a11y uses. So the threat of non-a11y accessibility services will decline.
Severity: normal → enhancement
Summary: Accessibility events not fired for text changes in input fields → Provide accessibility events when any accessibility service is active
This is apparently a problem for applications like Password Store[1]. I just wanted to put this back on the radar :)

[1] https://github.com/zeapo/Android-Password-Store/issues/176
This seems a major turn down for most (all?) password managers. I use Enpass and it's unable to autofill passwords. LastPass also doesn't autofill. May be this is a problem with accessibility apps itself (I don't use anyone, so I can't tell for sure) making this a huge problem for accessibility which is vital on an open source browser which should be very inclusive.
I think Autofill on Android Oreo can replace the accessibility feature quite well for lots of user cases except, of course, accessibility questions.
Michael, any chance this might get some attention?
Flags: needinfo?(michael.l.comella)
Susheel, can you triage this?
Flags: needinfo?(michael.l.comella) → needinfo?(sdaswani)
I'm going to punt to David as he can probably better coordinate this work.
Flags: needinfo?(sdaswani) → needinfo?(dbolter)
Eitan is closest to the metal here. Eitan can you triage/update/resolve this bug?
Flags: needinfo?(dbolter) → needinfo?(eitan)
Password manager support is being worked on in bug 1330257. It will both support the legacy api as well as the oreo autofill api. This maybe can be closed as a DUP if the main concern here was a11y-consuming password managers.
Flags: needinfo?(eitan)
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.