commit | 50a15b487e4fcebdf87ca58aa75a420c04dc25f2 | [log] [tgz] |
---|---|---|
author | Leonard Grey <lgrey@chromium.org> | Thu Jul 19 21:33:42 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Jul 19 21:33:42 2018 |
tree | b3f01a550ac31c6fe25a75113189407bd60f23c5 | |
parent | 8be401d6c606ea83d3000696f83750a027794f2e [diff] |
MacViews a11y: Announce omnibox suggestions on keyboard navigation Currently, when a user is navigating the omnibox suggestion list, we send two (handled) accessibility events: - Value changed - Selection changed (that is: the empty selection at the end of the text is in a different position because the string is a different length). On macOS, the "value changed" event is not triggering an announcement. However, the "selection change" event does, which causes odd behavior: the system reads a substring of a stale value, typically the previously selected suggestion. Safari behaves in a similar way, so I think this is less us doing something wrong and more VoiceOver being quirky. This change invokes an explicit announcement of the suggestion text, similar to how it's currently handled in Cocoa. To facilitate this, this change adds a new Mac-only[1] code path to the views accessibility system that allows directly specifying text for an accessibility announcement. Alternatives considered: - Always announcing text field value changes explicitly. This is probably overkill. - Adding a new native event to ax::mojom::Event to allow for sending arbitrary announcements. This has the problem that events can't carry arguments so there needs to either be some implicit convention for which attribute the announcement text is from, or extensive special casing every time an announcement is added. In practice, some substrings still get read from the selection announcement, but we have no straightforward way to suppress it. However, the suggestions are now read in full, so the impact from the noise is relatively small. [1] Mac-only due to time constraints since the linked bug is RBS. Bug: 863887 Change-Id: Iff220dff63e327d864bd5e5fbeb4523fab37bd94 Reviewed-on: https://chromium-review.googlesource.com/1142031 Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Leonard Grey <lgrey@chromium.org> Cr-Commit-Position: refs/heads/master@{#576640}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .