[SpatNav] Ignore certain ancestor focusables
Background: In SpavNav mode, more elements have become focus candidates: https://chromium-review.googlesource.com/c/chromium/src/+/1461355 https://chromium-review.googlesource.com/c/chromium/src/+/1632231 https://chromium-review.googlesource.com/c/chromium/src/+/1859535 These changes were the result of our efforts to avoid unreachable elements. In other words, SpatNav started to consider more elements, with tabIndex<0, as candidates. Problem: Sometimes this caused inconvenience because every "wrapping" element got focused towards the innermost candidate: The user had to press a direction key several times to reach the "real" focusable element, see the bug for more details. Solution: This CL tries to ignore certain extra, inconvenient focus candidates. If an element is recognized as focusable by SpatNav's extended condition (SupportsSpatialNavigationFocus() in element.cc) and it has one or several focusable descendant(s), then we ignore it in favor for its focusable descendant(s). We only ignore ancestor focusables with a non-negative tabIndex. Bug: 982601 Change-Id: I8d98fb2261f205b000e2ab7bae9f801272649784 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1900792 Commit-Queue: Jeonghee Ahn <jeonghee27.ahn@lge.com> Reviewed-by:Hugo Holgersson <hugoh@logikbyran.se> Reviewed-by:
Fredrik Söderquist <fs@opera.com> Cr-Commit-Position: refs/heads/master@{#724506}
Showing
Please register or sign in to comment