Closed Bug 783084 Opened 12 years ago Closed 12 years ago

[AccessFu] Enable accessfu when toggled in Gaia

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

      No description provided.
Have not made a pull request for this in Gaia yet, but here is what happens on that end:
https://github.com/eeejay/gaia/tree/screenreader-option
Attachment #652219 - Flags: review?(dbolter)
Comment on attachment 652219 [details] [diff] [review]
Activate AccessFu when screen reader is enabled in B2G.

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

::: accessible/src/jsat/AccessFu.jsm
@@ +48,5 @@
>        Services.obs.addObserver(this, 'Accessibility:Settings', false);
>  
> +    if (Utils.MozBuildApp == 'b2g')
> +      aWindow.addEventListener(
> +        'ContentStart',

I was all "wuh?" then I saw this sent from b2g's shell.js :)

@@ +202,5 @@
>        }
> +      case 'mozContentEvent':
> +      {
> +        if (aEvent.detail.type == 'accessibility-screenreader') {
> +

nit: extraneous spacer line.

@@ +204,5 @@
> +      {
> +        if (aEvent.detail.type == 'accessibility-screenreader') {
> +
> +          let pref = aEvent.detail.enabled + 0;
> +          this._processPreferences(pref, pref);

I don't understand what + 0 does.
Comment on attachment 652219 [details] [diff] [review]
Activate AccessFu when screen reader is enabled in B2G.

Sort of a funny r=me here since I already reviewed a patch that obsoletes this one but fine.
Attachment #652219 - Flags: review?(dbolter) → review+
(In reply to David Bolter [:davidb] from comment #2)
> Comment on attachment 652219 [details] [diff] [review]
> Activate AccessFu when screen reader is enabled in B2G.
> 
> Review of attachment 652219 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: accessible/src/jsat/AccessFu.jsm
> @@ +48,5 @@
> >        Services.obs.addObserver(this, 'Accessibility:Settings', false);
> >  
> > +    if (Utils.MozBuildApp == 'b2g')
> > +      aWindow.addEventListener(
> > +        'ContentStart',
> 
> I was all "wuh?" then I saw this sent from b2g's shell.js :)
> 

From Gaia, actually, see the github link above.

> @@ +202,5 @@
> >        }
> > +      case 'mozContentEvent':
> > +      {
> > +        if (aEvent.detail.type == 'accessibility-screenreader') {
> > +
> 
> nit: extraneous spacer line.
> 

Yupyup

> @@ +204,5 @@
> > +      {
> > +        if (aEvent.detail.type == 'accessibility-screenreader') {
> > +
> > +          let pref = aEvent.detail.enabled + 0;
> > +          this._processPreferences(pref, pref);
> 
> I don't understand what + 0 does.

Turns a boolean into an integer. Javascript!
https://hg.mozilla.org/mozilla-central/rev/3131d6765a0e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: