Closed Bug 1798500 Opened 2 years ago Closed 2 years ago

Setting pref accessibility.force-disabled to -1 does not appear to enable accessibility on Linux

Categories

(Core :: Disability Access APIs, defect, P1)

defect

Tracking

()

RESOLVED FIXED
108 Branch
Tracking Status
firefox108 --- fixed

People

(Reporter: jkratzer, Assigned: Jamie)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

We recently replaced GNOME_ACCESSIBILITY=1 on linux with user_pref("accessibility.force_disabled", -1) and noticed that accessibility coverage dropped to near 0. After speaking with :jteh, it appears that this pref is not working as expected.

I'm actually starting to think this doesn't work on any platform other than Mac... and I don't even understand how it works there.

Eitan, how does this work on Mac? I see that ShouldA11yBeEnabled supports this and I see that ShouldA11yBeEnabled gets called in various places when the platform requests something on an Accessible. However, that still requires the platform to send some query before we create the AccService. The force enable just says we don't need to worry about AXEnhancedUserInterface. Does Mac just always send a11y queries or something?

Flags: needinfo?(eitan)

Copying Morgan and Nathan as well, since they might be surprised to learn that this pref doesn't actually work the way we think it does... or alternatively, they might be able to point out something I'm missing. :(

My recent testing of the Windows hang incident suggests to me that setting this pref in about:config is definitely working on Windows. This is probably my inexperience talking, but are we talking about doing this from about:config or starting the browser with --setpref="accessibility.force_disabled=-1", or something else?

(In reply to Nathan LaPré from comment #3)

My recent testing of the Windows hang incident suggests to me that setting this pref in about:config is definitely working on Windows.

That's helpful, thanks. Given that, plus something I just vaguely recalled seeing years ago, I finally found where we do this on Windows:
https://searchfox.org/mozilla-central/rev/aa1bb4f0ca8bfda4b117d1befca47b72d5dd6d5d/widget/windows/nsWindow.cpp#1235
This was implemented in bug 1342245. I was looking for a call to PlatformDisabledState, but the Windows widget code reads the pref directly. Urgh.

I also don't understand why we do this differently on every platform instead of creating the a11y service in some cross-platform way if it is force enabled. For Windows, bug 1342245 has this to say:

The post message bounce works around a lack of initialization for some objects checked in the GetAccessible code.

Unfortunately, I don't know which "some objects" had a "lack of initialization", so that's not super helpful.

This is probably my inexperience talking, but are we talking about doing this from about:config or starting the browser with --setpref="accessibility.force_disabled=-1", or something else?

Any way of setting a pref at startup.

Fixing this on Linux should be pretty straightforward. Ideally, I think this should be implemented in a cross-platform way, but that's going to require more investigation/thought, so let's deal with the problem at hand for now.

Assignee: nobody → jteh
Severity: -- → S3
Priority: -- → P1

(In reply to James Teh [:Jamie] from comment #4)

(In reply to Nathan LaPré from comment #3)

This is probably my inexperience talking, but are we talking about doing this from about:config or starting the browser with --setpref="accessibility.force_disabled=-1", or something else?

Any way of setting a pref at startup.

FWIW on mac you can change this dynamically without restart

Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28ca3769b1d4
Support accessibility.force_disabled=-1 for ATK. r=eeejay
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch
Flags: needinfo?(eitan)
Regressions: 1835360
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: