Bug 942991 - Updated virtual cursor navigation sounds. r=marcoz

This commit is contained in:
Eitan Isaacson 2013-11-26 16:53:45 -08:00
parent de17dc945d
commit ff59b7b5a1
6 changed files with 12 additions and 5 deletions

View File

@ -496,7 +496,7 @@ var Output = {
},
speechHelper: {
EARCONS: ['chrome://global/content/accessibility/tick.wav'],
EARCONS: ['virtual_cursor_move.ogg', 'virtual_cursor_key.ogg'],
earconBuffers: {},
@ -509,9 +509,10 @@ var Output = {
this.webspeechEnabled = !!window.speechSynthesis;
for (let earcon of this.EARCONS) {
let earconName = /.*\/(.*)\..*$/.exec(earcon)[1];
let earconName = /(^.*)\..*$/.exec(earcon)[1];
this.earconBuffers[earconName] = new WeakMap();
this.earconBuffers[earconName].set(window, new window.Audio(earcon));
this.earconBuffers[earconName].set(
window, new window.Audio('chrome://global/content/accessibility/' + earcon));
}
this.inited = true;

View File

@ -20,6 +20,8 @@ XPCOMUtils.defineLazyModuleGetter(this, 'UtteranceGenerator',
'resource://gre/modules/accessibility/OutputGenerator.jsm');
XPCOMUtils.defineLazyModuleGetter(this, 'BrailleGenerator',
'resource://gre/modules/accessibility/OutputGenerator.jsm');
XPCOMUtils.defineLazyModuleGetter(this, 'Roles',
'resource://gre/modules/accessibility/Constants.jsm');
this.EXPORTED_SYMBOLS = ['Presentation'];
@ -451,7 +453,10 @@ SpeechPresenter.prototype = {
type: this.type,
details: {
actions: [
{method: 'playEarcon', data: 'tick', options: {}},
{method: 'playEarcon',
data: aContext.accessible.role === Roles.KEY ?
'virtual_cursor_key' : 'virtual_cursor_move',
options: {}},
{method: 'speak',
data: UtteranceGenerator.genForContext(aContext).output.join(' '),
options: {enqueue: true}}

View File

@ -5,4 +5,5 @@
toolkit.jar:
content/global/accessibility/AccessFu.css (AccessFu.css)
content/global/accessibility/content-script.js (content-script.js)
content/global/accessibility/tick.wav (tick.wav)
content/global/accessibility/virtual_cursor_move.ogg (sounds/virtual_cursor_move.ogg)
content/global/accessibility/virtual_cursor_key.ogg (sounds/virtual_cursor_key.ogg)

Binary file not shown.

Binary file not shown.

Binary file not shown.