Issue metadata
Sign in to add a comment
|
TalkBack gets stale DOM content of pages |
||||||||||||||||||||||||
Issue descriptionChrome Version: latest Canary builds OS: Android What steps will reproduce the problem? (1) Launch TalkBack, Settings > Accessibility > TalkBack. (2) Install Chrome Canary and make it a default for browsing and web view. Also, make sure to enable "mobile-friendly" option in chrome://flags. (3) Open the Google Now feed and click on one of the articles to open it in a custom tab. (4) With TalkBack still on, tap on the "make this page mobile-friendly" button in the infobar. When the new view opens, touch it with your finger and attempt to explore by swiping left and right. (5) Press the BACK button to return to the "normal" view, then tap the "make this page mobile-friendly" button again. Now repeat step 4 and observe the difference. What is the expected result? TalkBack user should be abel to explore and hear the contents of the "mobile-friendly" page at all times. What happens instead? The contents of the "mobile-friendly" page can only be explored on the second time, not the first time. On the first time an empty view is presented to TalkBack instead.
,
Oct 17 2017
,
Oct 17 2017
I can reproduce it on Nexus 5 and Nexus 5X, but not Pixel. The recorded screen is attached. When the small element is selected, the audio says: "dom_distiller_material_spinner graphic". Looks like the accessibility interface got the old DOM state where the loading spinner is still there. This only happens when "Reader Mode in CCT" is turned off in flags.
,
Oct 17 2017
I can definitely reproduce this on Pixel. Try different pages.
,
Oct 17 2017
,
Oct 17 2017
On Pixel 2 XL, repro rate is 1/6 on Zine suggestions, with "Reader Mode in CCT" turned off.
,
Oct 18 2017
After using TalkBack intensively for a day, I can sometimes reach this state on normal web pages as well. The symptom is similar: no accessibility content, but visually it's working fine.
,
Oct 24 2017
This doesn't look exclusive to Reader Mode, even though the probability of this happening on the normal web pages is much lower. Laura, would you mind helping re-route this to the appropriate team?
,
Oct 27 2017
,
Oct 27 2017
@Dominic, would you be able to look into this or reroute to someone else who can?
,
Oct 30 2017
@ibobra and I should look at this together. Isha, could you try to reproduce first and then I can help you debug it?
,
Oct 31 2017
Could reproduce on nexus 6P.
,
Nov 1 2017
@wychen: Isha and I tried to debug it for a while today. We can reproduce the bug easily on Canary but not on our own build. Can you think of any reason why running Clankium would be much different? With Clankium, the mobile friendly page loads and it always works fine with TalkBack. Even with Canary, we enabled some verbose logs and determined that we're only seeing accessibility events from the distiller "loading" page. When the mobile friendly page appears, we don't see any accessibility events at all. Can you explain a bit about how the process works and point us to the relevant code? When the distiller "loading" page is visible and the mobile friendly page is finished, how is it swapped in? Is the current WebContents changed in-place? Is the current WebContents redirected to another url that serves the mobile friendly page? Or is the mobile friendly page loaded in a new WebContents that's shown in place of the old one? A high-level explanation and a pointer to that part of the code that triggers that swap would be helpful. Another thing that might be helpful would be a way to artificially delay the distilling, I'd like to see it stay on the "loading" page longer for debugging.
,
Nov 2 2017
Thanks for looking into this issue! I think the discrepancy between Canary and a local build is mostly timing, since this bug is timing-sensitive in nature. A non-component official release build might help shrink the gap. Debugging on Nexus 5 might also make it more reproducible. After distillation is done, a piece of JavaScript code is executed to populate the DOM elements. It's still in the same WebContents. You can take a look at OnArticleReady(), which calls SendJavaScript(), and in the end ExecuteJavaScriptInIsolatedWorld(). https://cs.chromium.org/chromium/src/components/dom_distiller/core/dom_distiller_request_view_base.cc?l=46&gs=cpp%253Adom_distiller%253A%253Aclass-DomDistillerRequestViewBase%253A%253AOnArticleReady(const%2Bdom_distiller%253A%253ADistilledArticleProto%2B*)%2540chromium%252F..%252F..%252Fcomponents%252Fdom_distiller%252Fcore%252Fdom_distiller_request_view_base.cc%257Cdef&gsn=OnArticleReady&ct=xref_usages I haven't tried, but I think it should be possible to add delay in OnArticleReady() so that it stays on the "loading" page for longer. Re: #c8 Dynamically loading content can happen on normal web pages as well, like AMP pages. I'm not sure whether the root cause is similar though.
,
Nov 7 2017
,
Nov 7 2017
I have a theory and two things that we can test on canary. Try running with this flag: --vmodule="*render_accessibility_impl*=1" Use adb_command_line and don't forget to append the other command line flags you need to turn the Reader feature on. What I'm looking for is if you see this message: "Failed to serialize one accessibility event" If that appears when it fails, that could explain why the accessibility tree isn't updating. Finally, I'm curious if rotating the display and rotating it back fixes it when it's broken.
,
Nov 7 2017
Following the instruction in #c16, I didn't see the error message. I did see lots of messages in this format: [VERBOSE1:render_accessibility_impl.cc(456)] Accessibility event: .... Rotating the display doesn't fix it.
,
Nov 7 2017
OK, one theory was wrong. For the logs you did see, I know they get truncated but critically, do you see any events that appear to be sending over the accessibility tree for the *new* formatted page? Or are you only seeing events related to the loading page? On the browser site where we're serving accessibility via Java we seem to be stuck with the loading page, and it's not clear why. It's especially confusing if it's all happening only via JavaScript. Are you sure there's no page transition or swapping of WebContents or RenderFrameHosts happening? It looks a lot like what I'd expect to happen if we're serving out of a stale RenderFrameHost and not the one that's visually on top.
,
Nov 9 2017
We do swap WebContents, but that's before showing the loading page. When we get into Reader Mode, one WebContents is created for the DOM distiller viewer, and swapped with the original one, while the distillation might still be ongoing in the original WebContents. Is it possible that some accessibility channels are still with the original WebContents? It seems unlikely since we've already got the accessibility events from the loading page.
,
Nov 9 2017
In the latest builds of Canary I'm getting "no data" message pretty much 100% of the time when attempting to access "mobile-friendly" view.
,
Nov 27 2017
Comment#20 looks like some other issue. It can be reproduced using clankium for mobile-friendly views of facebook.com and twitter.com almost everytime, but for other sites, I was not able to see it getting reproduced.
,
Nov 28 2017
,
Nov 28 2017
We are able to repro this issue in M63 and M64 builds when reader mode flag is on, but it is very hard to bisect, It is not consistent behavior for all articles. Tested Device : Pixel 2XL/OPD Tested on "Chrome on Andriod" Steps: Talkback is ON 1. Launch the app 2. Enable the flag -Reader mode flag for all articles 3. Open new tab 4. Tap on any article and open in Reader mode 5. Try to tap access the article(Tap or side swipe) Good Build :63.0.3224.4 Bad Build :63.0.3226.0,63.0.3231.0 63.0.3226.0 -> we hit the issue on first time open the reader mode article. 63.0.3231.0 -> We hit the the issue most of the times CL range: https://chromium.googlesource.com/chromium/src/+log/63.0.3224.0..63.0.3231.0?pretty=fuller&n=10000
,
Nov 29 2017
,
Nov 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8df7574b3caa59a25de7c735f0abdd2735a4dccb commit 8df7574b3caa59a25de7c735f0abdd2735a4dccb Author: Jinsuk Kim <jinsukkim@chromium.org> Date: Thu Nov 30 00:01:58 2017 Fix the stale DOM bug for a11y mobile-friendly pages https://crrev.com/c/688035 accidentally made calls to reset a11y mode when disabling WebContentsAccessibility state. This CL prevents it to fix the stale DOM issue reported in a11y mobile-friendly pages (and maybe in others). Bug: 775532 Change-Id: I69cffa7a10c5fd466941faa12ee121b5be2a746e Reviewed-on: https://chromium-review.googlesource.com/795478 Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#520312} [modify] https://crrev.com/8df7574b3caa59a25de7c735f0abdd2735a4dccb/content/browser/accessibility/web_contents_accessibility_android.cc
,
Nov 30 2017
This is a regression in M63 which can have some impact on users of a11y.
,
Nov 30 2017
This bug requires manual review: We are only 4 days from stable. Please contact the milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 30 2017
,
Nov 30 2017
Please verify the fix in the next canary
,
Nov 30 2017
jinsukkim@ I hope we are not missing any use case that could be negatively impacted by the removal of that code in your changelist. Do we have tests for that?
,
Nov 30 2017
Unfortunately I don't have tests for that. But what I can say is that the removed code had been a dead code before the culprit CL https://crrev.com/c/688035 landed. But the CL inadvertently executed it, which caused the regression. Mine fixed it by removing the dead code which should not have been executed in the first place. I'm quite sure it won't have any negative impact.
,
Nov 30 2017
Merge approved upon verification of the fix in canary. Also verify the fix on branch 3239 after merging it.
,
Nov 30 2017
Verified in M64-64.0.3281.0 build with Pixel device-"Chrome on Android"
,
Nov 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/67687391dfa99542f6a94a5556258ef8eb8b2a68 commit 67687391dfa99542f6a94a5556258ef8eb8b2a68 Author: Jinsuk Kim <jinsukkim@chromium.org> Date: Thu Nov 30 23:11:32 2017 Fix the stale DOM bug for a11y mobile-friendly pages https://crrev.com/c/688035 accidentally made calls to reset a11y mode when disabling WebContentsAccessibility state. This CL prevents it to fix the stale DOM issue reported in a11y mobile-friendly pages (and maybe in others). Bug: 775532 Change-Id: I69cffa7a10c5fd466941faa12ee121b5be2a746e Reviewed-on: https://chromium-review.googlesource.com/795478 Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org> Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#520312}(cherry picked from commit 8df7574b3caa59a25de7c735f0abdd2735a4dccb) Reviewed-on: https://chromium-review.googlesource.com/798910 Cr-Commit-Position: refs/branch-heads/3239@{#619} Cr-Branched-From: adb61db19020ed8ecee5e91b1a0ea4c924ae2988-refs/heads/master@{#508578} [modify] https://crrev.com/67687391dfa99542f6a94a5556258ef8eb8b2a68/content/browser/accessibility/web_contents_accessibility_android.cc
,
Nov 30 2017
I've also verified 64.0.3281.0 on Nexus 5. It is much easier to reproduce the symptom on lower-end devices like N5 than Pixel 2.
,
Dec 1 2017
Issue no longer reproducible on Pixel XL/ OPM1.171019.011 having monochrome dev 64.0.3281.0 on webview apps Amazon,Facebook,Pinterest
,
Dec 5 2017
"Chrome on Android"-Verified on M63-63.0.3239.83 build
,
Dec 5 2017
Issue 791453 has been merged into this issue.
,
Dec 7 2017
Issue no longer reproducible on Pixel / 63.0.3239.83 (Monochrome stable) and tested webview apps like amazon, wikipedia webview content after the steps mentioned in #23 |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by vtsaran@chromium.org
, Oct 17 2017