New issue
Advanced search Search tips

Issue 852653 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment

Unable to disable spoken feedback if Android window is focused

Project Member Reported by yawano@chromium.org, Jun 14 2018

Issue description

Chrome Version: ToT
OS: Chrome

What steps will reproduce the problem?
(1) Enable spoken feedback.
(2) Open any Android window.
(3) Press Ctrl+Alt+Z to disable spoken feedback.

What is the expected result?
Spoken feedback is disabled.

What happens instead?
Spoken feedback is disabled and re-enabled immediately.
 

Comment 1 by yawano@chromium.org, Jun 14 2018

Cc: dtseng@chromium.org
This is what's happening here.

- User presses key. Key event is dispatched. (Let's call this as event1)
- SpokenFeedbackEventRewriter sends this to ChromeVox extension and consume it.
[Session ends]

---

- SpokenFeedbackEventRewriter re-posts the event1 as event1a.
- AcceleratorFilter gets the events. But it doesn't handle as this doesn't contain Search key in it.
- exo::Keyboard gets it and send it to Android. Also it marks the event as handled.
- FocusManagerEventHandler gets it and handle it as accelerator. (spoken feedback is disabled) (*1)
[Session ends]

---

- exo::Keyboard re-posts it as Android app hasn't handled the event.
- ChromeVox shortcut is triggered again. (spoken feedback is re-enabled)
[Session ends]

I think that FocusManagerEventHandler should not handle the key event as accelerator if it's marked as handled at *1.

Comment 2 by yawano@chromium.org, Jun 14 2018

Cc: yawano@chromium.org
Turning on spoken feedback while Android window is focused works. But the above explanation doesn't explain why it works. I've investigated it. It turns out that having focus on FocusStealer of AxTreeSourceArc is making this difference.

FocusManagerEventHandler checks focused view in its widget's FocusManager. If spoken feedback is disabled, no view is focused. If no view is focused, it doesn't handle key event. But if spoken feedback is on, FocusStealer has focus and the handler handles the event.

I think the other way of fixing this is to remove FocusStealer. I could have directly attached child ax tree to ExoShellSurface but ChromeVox navigation hasn't worked properly.

The benefit of this approach is that we can have the same view hierarchy. We can avoid having this kind of bug in the future.

dtseng@: Do you think it's possible to remove FocusStealer?

Comment 3 by yawano@chromium.org, Jun 26 2018

 Issue 856684  has been merged into this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 26 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017

commit c9c23766b5e7cd47c4a8ce29e6c67c5161d69017
Author: Yuki Awano <yawano@chromium.org>
Date: Tue Jun 26 23:40:03 2018

Directly attach ax tree to contents view of focused window

- Remove focus stealer and directly attach ax tree to contents view of
  widget delegate of focused widget.
- Returns contents view of widget delegate as focused view if no view is
  focused.

Bug:  852653 
Test: Enable ChromeVox arc native support and confirm that it works.
Change-Id: I22feb9c79e54653a037a2b78b729d76fcbb29fa2
Reviewed-on: https://chromium-review.googlesource.com/1103982
Commit-Queue: Yuki Awano <yawano@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570585}
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/components/exo/shell_surface_base.cc
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/components/exo/shell_surface_base.h
[modify] https://crrev.com/c9c23766b5e7cd47c4a8ce29e6c67c5161d69017/ui/views/accessibility/ax_aura_obj_cache.cc

Comment 5 by yawano@chromium.org, Jun 26 2018

Status: Fixed (was: Started)
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eac8cee728d16cc447bed4a9e687128c8eae19b3

commit eac8cee728d16cc447bed4a9e687128c8eae19b3
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Wed Jun 27 03:56:10 2018

Revert "Directly attach ax tree to contents view of focused window"

This reverts commit c9c23766b5e7cd47c4a8ce29e6c67c5161d69017.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 570585 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2M5YzIzNzY2YjVlN2NkNDdjNGE4Y2UyOWU2YzY3YzUxNjFkNjkwMTcM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.memory/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20%281%29/28051

Sample Failed Step: browser_tests

Original change's description:
> Directly attach ax tree to contents view of focused window
> 
> - Remove focus stealer and directly attach ax tree to contents view of
>   widget delegate of focused widget.
> - Returns contents view of widget delegate as focused view if no view is
>   focused.
> 
> Bug:  852653 
> Test: Enable ChromeVox arc native support and confirm that it works.
> Change-Id: I22feb9c79e54653a037a2b78b729d76fcbb29fa2
> Reviewed-on: https://chromium-review.googlesource.com/1103982
> Commit-Queue: Yuki Awano <yawano@chromium.org>
> Reviewed-by: David Reveman <reveman@chromium.org>
> Reviewed-by: David Tseng <dtseng@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#570585}

Change-Id: I87f22eada8856c3ef901c09e4e096640f48f1a74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  852653 
Reviewed-on: https://chromium-review.googlesource.com/1116159
Cr-Commit-Position: refs/heads/master@{#570656}
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/components/exo/shell_surface_base.cc
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/components/exo/shell_surface_base.h
[modify] https://crrev.com/eac8cee728d16cc447bed4a9e687128c8eae19b3/ui/views/accessibility/ax_aura_obj_cache.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4514da6e45e51edafc8a608a0194020be8a2956

commit b4514da6e45e51edafc8a608a0194020be8a2956
Author: Yuki Awano <yawano@chromium.org>
Date: Thu Jun 28 05:29:19 2018

Reland: Directly attach ax tree to contents view of focused window

- Remove focus stealer and directly attach ax tree to contents view of
  widget delegate of focused widget.
- Returns contents view of widget delegate as focused view if no view is
  focused.

Bug:  852653 
Test: Enable ChromeVox arc native support and confirm that it works.
Change-Id: Ib370a6a2efa11d04211d8dbeae92b95a7e125dfb
Reviewed-on: https://chromium-review.googlesource.com/1117720
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Yuki Awano <yawano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571035}
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/components/exo/shell_surface_base.cc
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/components/exo/shell_surface_base.h
[modify] https://crrev.com/b4514da6e45e51edafc8a608a0194020be8a2956/ui/views/accessibility/ax_aura_obj_cache.cc

Sign in to add a comment