-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mobile VO skips content in the PDOM #175
Comments
I have exhausted just about everything I can think of here and ready to recommend we list this as one of the known AT bugs. |
@terracoda suggested running the HTML through a validator to see if it reports anything amiss. EDIT: I ran the validator, no errors. Just a few warnings that seem unrelated. EDIT: "View page source" gave me incomplete HTML, copying HTML from the dev tools showed me these errors from the validator". HTML copied was when the PDOM is in the state that VO skips content: Both are attributes on the "Sim Voicing" button in the Toolbar, very unlikely to be causing this. @terracoda also suggested that maybe unicode marks are causing this. We have seen unicode interfere with AT output in the past. I looked for unicode or other artifacts in the skipped content and didn't see any. My understanding is that unicode marks are added in built versions only and we are seeing this in both built and unbuilt versions |
@terracoda recommended testing without any CSS, that was a good idea. Here is a test case that I set up by
The problem STILL happens even when there is only the unstyled PDOM left. Here is the result: Untitled.video.-.Made.with.Clipchamp.mp4Once graphics are removed, I swipe with VoiceOver to try to read all paragraphs. You can see content skipped. Near the end of the video I tap on the skipped paragraph with my finger and that makes the problem go away. This could get us closer to identifying what is causing the issue if we want to continue. |
@zepumph and I met to try to isolate the cause of this. We returned to the example HTML pages and found that this IS happening outside of PhET sims. I don't know why I wasn't seeing it when testing alone, maybe I failed to clear caches, or HTML updates happened to slowly. Anyway, here is the most simple breaking case: <!DOCTYPE html>
<html>
<body>
<h1>My Heading</h1>
<p>Friction is an interactive sim. It changes as you play with it. It has a Play Area and a Control Area.</p>
<p id='summary-paragraph'>Summary HERE!</p>
<p>Reset sim to make more observations.</p>
<p>If needed, check out keyboard shortcuts under Sim Resources.</p>
<script>
let i = 0;
window.setInterval( () => {
let summaryParagraph = document.getElementById( 'summary-paragraph' );
summaryParagraph.textContent = ` ${i++} Chemistry book has far fewer jiggling atoms as many have broken away. Chemistry book rests lightly on top of a Physics book, and is ready to be rubbed against it. In zoomed-in view of where books meet, surface temperature is cool, and atoms jiggle a tiny bit.`;
}, 10000 );
</script>
</body>
</html> We found that paragraph will become undiscoverable with iOS VoiceOver whenever its But we did find a workaround that DOES fix it: adding
|
We wanted to run our findings by @terracoda and @emily-phet to help decide where to go from here. We did find a workaround but do not recommend using it. This is clearly an iOS problem and the workaround is totally hacky. It seems to work now but since it is outside of any DOM specification it could also stop working any time. If we proceed with it, we will do work in scenery to make sure that that all |
@jessegreenberg I think we shouldn't implement the workaround - but great that's it's more clear what the root of the issue is. |
I think it would be nice to have a non-blocking conversation about adding these to our screen summary paragraphs. It would be a nice improvement in my mind to convey that this is not just a paragraph, but a dynamic text space that updates with the sim's updates. I defer to the A11y designers though. |
Excellent detective work. This might also be an issue for MAL’s observation window, and GHE might have a dynamic Scene Summary similar in structure to the summary in Friction. There are a couple of design things we should seriously discuss and consider for the long run:
I agree with @emily-phet that we should not implement the hack. It’s not a long term solution. I do feel not having access to the scene summary in Friction - its single dynamic state description - is a bit of a problem which I think can be resolved with a small amount of re-wording and a reduction in parameters- the temperature is either dropping or already at cool. In retrospect, apologies for designing such accurate state descriptions that screen reader software can’t handle them 😀 At least not as of July 2022. |
Ok, thanks @emily-phet and @terracoda! I'll write a bug report to Apple about this just in case. I'll also add this to the list of known AT problems. |
Bug report submitted to apple, we will see if they respond. |
@terracoda shared that there is a special address that Apple has for critical accessibility problems, Ill try and submit this issue there as well. |
I am running iOS 15.7.8 on my iPhone 7 and I still seem to experience this issue. I hear the description for the Chemistry book on sim load, but then after interaction I can't seem to find that description with horizontal or vertical swipes using iOS VoiceOver. |
I can however grab and rub the books, so the custom grab is now working for Friction. What issue is related to that bug? |
Identified in
phetsims/friction#292
phetsims/greenhouse-effect#195
phetsims/john-travoltage#449
phetsims/friction#308
Mobile VO sometimes skips PDOM content.
Notes from testing:
In the case of friction, after particles the second two paragraphs in the screen summary are no longer readable in the PDOM.
I thought it might have something to with aria-live, but it doesn't happen after pressing the ResetAllButton which triggers an alert. I tried changing the ResetAllButton alert to assertive but it made no difference.
In one test, I found that content disappeared in friction only after all particles broke away from the book.
I noticed that in Friction, the content that gets skipped is nested under a div:
I tried pulling the paragraphs out of that div, it did not fix it.
I noticed turning VO on and off again fixes the problem.
I removed the div mentioned in the image above. VoiceOver still skips the first paragraph that was under the div, but does read the second one.
I noticed that the paragraphs that gets skipped are the ones whose content changes.
Ive been creating a more and more complicated test case, trying to reproduce what we are seeing in the sim. The demo as an aria-live element that spams alerts and paragraphs of text content that update. Ive tried
So far I haven't seen the bug. Heres the html
I have tethered my ipad to my Mac and I can maniuplate the Friction PDOM in real time while VoiceOver runs. Ive been changing tags and removing attributes to see if anything impacts things. So far nothing has made a difference.
I was changing attributes and innerHTML wildly without any changes like this:
![image](https://user-images.githubusercontent.com/6396244/181641923-97505d31-3c09-40d2-beac-92b83e434097.png)
You can see the paragraph that is not being read highlighted in the DOM. Also some new paratraphs that I added to the DOM, VoiceOver is ignoring those too. But then I toggled "All Audio" off and suddenly VoiceOver is reading all the content again!
But maybe that is because the sim crashed, I got a "cannot read null" error in the dev tools.No, I verified that turning off all audio makes issue go away. Why?Once VoiceOver starts reading the paragraphs again, it is more difficult for it to break again but it does happen eventually. I removed all particles from the book ~3 times before the screen summary content became undescoverable again.
I have noticed a couple of times in the sim that the paragraph becomes undiscoverable when reading it gets interrupted by an assertive alert. I tried but have not been able to observe this in my vanilla HTML.
I tried removing the work of the "All Audio" toggle button and its aria-pressed state and still found that pressing that button makes the issue go away.
I found that if I wait for all alerts to be spoken (waiting until the "reset sim to make observations" alert in Friction) I do not see this bug. I think that is an important trigger for the bug.
I tried disabling sound in case that was causing this problem because pressing the audio button seems to fix this. But the behavior is the same. For some reason pressing the "All Audio" button makes the problem go away, even when the button does nothing.
I am now seeing that pressing the "Reset All" button makes the problem go away. Is it an activation event that fixes it? I just produced the problem, then double tapped on a book to pick it up and release it. It made the problem go away.
I disabled all alerts and I still see the problem. So it has nothing to do with aria-live.
I tried forcing a re-render of the DOM element in the PDOM by toggling it back and forth between a
div
and ap
. No impact.I tried in my example HTML changing the DOM content with very long strings in the paragraph content (~8 seconds to read) like in the sim. No impact.
I tried in my example HTML having the paragraph content update while I doing a custom drag and drop action. I pressed the "Toggle Alerting" button and then double-tap and held the button to start drag/drop events while the paragraph text content updated. No impact.
I tried testing with a full copy of the PDOM in Friction, and adding a script to update the content of the summary paragraph every 5 seconds. I tested with drag/drop input. The bug did not appear.
The text was updated successfully, but these errors were encountered: