[AccessFu] Introduce haptic presenter

RESOLVED FIXED in mozilla19

Status

()

Core
Disability Access APIs
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: eeejay, Assigned: eeejay)

Tracking

Trunk
mozilla19
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
In some occasions we would want to have the device to vibrate along with the regular aural feedback.
(Assignee)

Comment 1

6 years ago
Created attachment 680109 [details] [diff] [review]
Introduce haptic feedback.
(Assignee)

Updated

6 years ago
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+
(Assignee)

Comment 3

6 years ago
(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
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.