tree: 74a2cabd2dd7eaae9629616996a26550a19398cb [path history] [tgz]
  1. output.js
  2. output_ancestry_info.js
  3. output_format_parser.js
  4. output_format_tree.ts
  5. output_formatter.js
  6. output_interface.ts
  7. output_logger.js
  8. output_role_info.js
  9. output_rules.js
  10. output_test.js
  11. output_types.ts
  12. README.md
chrome/browser/resources/chromeos/accessibility/chromevox/background/output/README.md

Output in ChromeVox

ChromeVox has a few different ways of producing output. Sometimes, speech is provided directly to Output.withString() -- after internationalizing via Msgs.getMsg(). This at first seems like the right approach for most situations, but the Output class has developed a sophisticated method of automatically determining the output strings, based on the change in the CursorRange that ChromeVox is focused on and the type of event that's occurring (which could be navigation, or any chrome.automation.EventType).

Using Output to Produce Speech

During navigation, output is generated from the current and previous ranges without needing to be explicitly specified. It uses announcement patterns that are specified in the file output_rules.js in a special markup language. It also navigates the ancestors of both ranges to make appropriate announcements for any nodes that have been entered or exited, again using rules from output_rules.js.

When an AutomationEvent is received, output is produced by passing the event and the current range. These announcements are also specified in output_rules.js.