Closed Bug 810359 Opened 9 years ago Closed 9 years ago

[AccessFu] Introduce haptic presenter

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: eeejay, Assigned: eeejay)

Details

Attachments

(1 file)

In some occasions we would want to have the device to vibrate along with the regular aural feedback.
Attachment #680109 - Flags: review?(dbolter)
Comment on attachment 680109 [details] [diff] [review]
Introduce haptic feedback.

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

r=me

(I'm sort of wondering if pivotChanged should be renamed to something like pivotChangedResult)

::: accessible/src/jsat/AccessFu.jsm
@@ +326,5 @@
>        this._bridge.handleGeckoMessage(JSON.stringify({gecko: androidEvent}));
>      }
>    },
>  
> +  Haptic: function Haptic(aDetails, aBrowser) {

I'd probably put this before the Android section but up to you.

::: accessible/src/jsat/Presenters.jsm
@@ +383,5 @@
> +  __proto__: Presenter.prototype,
> +
> +  type: 'Haptic',
> +
> +  pivotChanged: function SpeechPresenter_pivotChanged(aContext, aReason) {

nit: HapticPresenter_pivotChanged

@@ +384,5 @@
> +
> +  type: 'Haptic',
> +
> +  pivotChanged: function SpeechPresenter_pivotChanged(aContext, aReason) {
> +    return { type: this.type, details: {pattern: [20]} };

nit: magic number (ok for now)
Attachment #680109 - Flags: review?(dbolter) → review+
(In reply to David Bolter [:davidb] from comment #2)
> Comment on attachment 680109 [details] [diff] [review]
> Introduce haptic feedback.
> 
> Review of attachment 680109 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> r=me
> 
> (I'm sort of wondering if pivotChanged should be renamed to something like
> pivotChangedResult)
> 

Discussed this on IRC.

> ::: accessible/src/jsat/AccessFu.jsm
> @@ +326,5 @@
> >        this._bridge.handleGeckoMessage(JSON.stringify({gecko: androidEvent}));
> >      }
> >    },
> >  
> > +  Haptic: function Haptic(aDetails, aBrowser) {
> 
> I'd probably put this before the Android section but up to you.
> 

It is adjacent to the SpeechPresenter, which makes sense.

> ::: accessible/src/jsat/Presenters.jsm
> @@ +383,5 @@
> > +  __proto__: Presenter.prototype,
> > +
> > +  type: 'Haptic',
> > +
> > +  pivotChanged: function SpeechPresenter_pivotChanged(aContext, aReason) {
> 
> nit: HapticPresenter_pivotChanged
> 

Yup.

> @@ +384,5 @@
> > +
> > +  type: 'Haptic',
> > +
> > +  pivotChanged: function SpeechPresenter_pivotChanged(aContext, aReason) {
> > +    return { type: this.type, details: {pattern: [20]} };
> 
> nit: magic number (ok for now)

I'll make that an object attribute.
https://hg.mozilla.org/mozilla-central/rev/543413e0df70
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.