Closed Bug 917399 Opened 11 years ago Closed 11 years ago

[AccessFu] Remove mozContentEvent listener and listen for settings changes directly

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27
Tracking Status
firefox26 --- fixed
firefox27 --- fixed

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Currently we listen for ContentStart and then mozContentEvent in order to know if the accessibility.screenreader setting has been modified. This only works with the b2g chrome js, and thus not in the browser.

I would suggest we get the screen reader setting directly from the settings API.
Attachment #806145 - Flags: review?(yura.zenevich)
Blocks: 917586
Comment on attachment 806145 [details] [diff] [review]
Use settings API for enabling/disabling AccessFu.

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

r=me with a small change :)

::: accessible/src/jsat/AccessFu.jsm
@@ +39,5 @@
>        // Not on Android
> +      if (aWindow.navigator.mozSettings) {
> +        let lock = aWindow.navigator.mozSettings.createLock();
> +        let req = lock.get(SCREENREADER_SETTING);
> +        req.addEventListener('success', () => {

Better to use req.onsuccess = () => {...};
Attachment #806145 - Flags: review?(yura.zenevich) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/10dbb333ca83

After a short discussion on IRC, we decided to keep addEventListener
Assignee: nobody → eitan
https://hg.mozilla.org/mozilla-central/rev/10dbb333ca83
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Comment on attachment 806145 [details] [diff] [review]
Use settings API for enabling/disabling AccessFu.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): changed contentScript behavior causing screen reader to not fully load when activating it from Gaia's Developer settings panel.
User impact if declined: Developers could not actually test accessibility because parts of the screen reader would not load, like Exploring the screen would not work.
Testing completed (on m-c, etc.): Yes.
Risk to taking this patch (and alternatives if risky): None.
String or IDL/UUID changes made by this patch: None.
Attachment #806145 - Flags: approval-mozilla-aurora?
Attachment #806145 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: