Closed Bug 978075 Opened 10 years ago Closed 10 years ago

[AccessFu] Announce screenreader start and stop

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: eeejay, Assigned: eeejay)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently, the user is greeted with a hushed silence when the screen reader is activated in b2g. We should have something announced. Possible expansions of this are also hearing a chime, and having the cursor land on an object.
This patch does several other things:
 1. When a PrefCache with no default setting available is created, or cleared, set value to null.
 2. Removed weird margin change in announce box.
 3. Add announce method to speech presenter.
 4. Don't start and stop AccessFu implicitly in AccessFuTest.
 5. Change tests to two start/stop pairs where in one pair we activate via pref, and
     the other one via settings (TODO).
Attachment #8383710 - Flags: review?(yzenevich)
Updated live region tests.
Attachment #8383710 - Attachment is obsolete: true
Attachment #8383710 - Flags: review?(yzenevich)
Attachment #8383806 - Flags: review?(yzenevich)
Comment on attachment 8383806 [details] [diff] [review]
Screen reader turn on and off announce.

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

Awesome! r=me with nits.

::: accessible/src/jsat/AccessFu.jsm
@@ +135,5 @@
>        delete this.readyCallback;
>      }
> +
> +    if (Utils.MozBuildApp !== 'mobile/android') {
> +      this.announce(Services.strings.

Services.strings.createBundle('chrome://global/locale/AccessFu.properties') should go to Utils.jsm since it's already used in OutputGenerator.

@@ +136,5 @@
>      }
> +
> +    if (Utils.MozBuildApp !== 'mobile/android') {
> +      this.announce(Services.strings.
> +        createBundle('chrome://global/locale/AccessFu.properties').

Nit: bad line breakage.

@@ +155,5 @@
>  
>      Utils.win.document.removeChild(this.stylesheet.get());
>  
> +    if (Utils.MozBuildApp !== 'mobile/android') {
> +      this.announce(Services.strings.

As mentioned above, we should create bundle once.

@@ +527,5 @@
>  
>      init: function init() {
>        let window = Utils.win;
> +      this.webspeechEnabled = !!window.speechSynthesis &&
> +        !!window.SpeechSynthesisUtterance;

Nice!

::: accessible/tests/mochitest/jsat/jsatcommon.js
@@ +93,5 @@
>      // Disable the console service logging.
>      Logger.test = false;
>      Logger.logLevel = Logger.INFO;
> +    // Finish through idle callback to let AccessFu._disable complete.
> +    Utils.win.setTimeout(function () {

SimpleTest.executeSoon
Attachment #8383806 - Flags: review?(yzenevich) → review+
Done!
Assignee: nobody → eitan
https://hg.mozilla.org/mozilla-central/rev/445ad0b80d92
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: