How to use the accessibility.screenreader function in accessibility

To help you get started, we’ve selected a few accessibility examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla-b2g / gaia / tv_apps / smart-system / js / accessibility.js View on Github external
announceScreenReader: function ar_announceScreenReader() {
      var enabled = this.settings['accessibility.screenreader'];
      this.isSpeaking = true;
      return this.speak({
        string: enabled ? 'disableScreenReaderSteps' : 'enableScreenReaderSteps'
      }, {enqueue: false});
    },
github mozilla-b2g / gaia / apps / system / js / accessibility.js View on Github external
this.reset();

      if (!this.isSpeaking && timeStamp > this.expectedCompleteTimeStamp) {
        this.cancelSpeech();
        this.announceScreenReader(function onEnd() {
          this.resetSpeaking(timeStamp + this.REPEAT_BUTTON_PRESS);
        }.bind(this));
        return;
      }

      this.cancelSpeech();
      this.resetSpeaking();
      SettingsListener.getSettingsLock().set({
        'accessibility.screenreader':
          !this.settings['accessibility.screenreader']
      });
    },
github mozilla-b2g / gaia / apps / settings / js / accessibility.js View on Github external
req.onsuccess = function bt_getSettingsSuccess() {
    gScreenreaderCheckbox.checked = req.result['accessibility.screenreader'];
  };
github mozilla-b2g / gaia / apps / system / js / accessibility.js View on Github external
announceScreenReader: function ar_announceScreenReader(aCallback) {
      var enabled = this.settings['accessibility.screenreader'];
      this.isSpeaking = true;
      this.speak({
        string: enabled ? 'disableScreenReaderSteps' : 'enableScreenReaderSteps'
      }, aCallback, {enqueue: false});
    },
github mozilla-b2g / gaia / tv_apps / smart-system / js / accessibility.js View on Github external
this.reset();

      if (!this.isSpeaking && timeStamp > this.expectedCompleteTimeStamp) {
        this.speechSynthesizer.cancel();
        this.announceScreenReader().then(() => {
          this.resetSpeaking(timeStamp + this.REPEAT_BUTTON_PRESS);
        });
        return;
      }

      this.speechSynthesizer.cancel();
      this.resetSpeaking();
      SettingsListener.getSettingsLock().set({
        'accessibility.screenreader':
          !this.settings['accessibility.screenreader']
      });
    },
github mozilla-b2g / gaia / apps / settings / js / accessibility.js View on Github external
req.onsuccess = function bt_getSettingsSuccess() {
      confirmDlg.show(!req.result['accessibility.screenreader']);
    };