Commit ecf0ee81 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Provide time and date feedback in braille

R=akihiroota@chromium.org

Fixed: 816631
AX-Relnotes: time and date (Search+a, d) feedback provided in braille as well as speech.
Change-Id: Ic0447e493ef88cca3f494534e8397370abf2d972
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2288090Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#786606}
parent df9cd410
...@@ -2698,3 +2698,13 @@ TEST_F('ChromeVoxBackgroundTest', 'FocusOnUnknown', function() { ...@@ -2698,3 +2698,13 @@ TEST_F('ChromeVoxBackgroundTest', 'FocusOnUnknown', function() {
.replay(); .replay();
}); });
}); });
TEST_F('ChromeVoxBackgroundTest', 'TimeDateCommand', function() {
const mockFeedback = this.createMockFeedback();
this.runWithLoadedTree('<p></p>', function(root) {
mockFeedback.call(doCmd('speakTimeAndDate'))
.expectSpeech(/(AM|PM)*(2)/)
.expectBraille(/(AM|PM)*(2)/)
.replay();
});
});
...@@ -88,6 +88,7 @@ CommandHandler.onCommand = function(command) { ...@@ -88,6 +88,7 @@ CommandHandler.onCommand = function(command) {
}); });
if (timeString) { if (timeString) {
ChromeVox.tts.speak(timeString, QueueMode.FLUSH); ChromeVox.tts.speak(timeString, QueueMode.FLUSH);
ChromeVox.braille.write(NavBraille.fromText(timeString));
} else { } else {
// Fallback to the old way of speaking time. // Fallback to the old way of speaking time.
const output = new Output(); const output = new Output();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment