Closed Nancy-Salpepi closed 1 year ago
It is possible the double-tap gesture is sending events to a place that is not clickable in the sim. setPDOMTransformSourceNode
may help with this.
Is there a way to debug positionInPDOM with bounding rectangles?
I don't think so unfortunately. You could hack PDOMSiblingStyle such that the elements are visible. The black rectangle with VO should also be the rectangle we care about if you have access to VO.
positionInPDOM will use the bounds of whatever has the tagName for the focusable zoomed in book, if you can draw a rectangle around that Node.
And it is possible the problem is something else entirely :/
I think you are totally on the right track, the center of the currently positioned node won't hit the visual magnified book:
I used this patch to get this view:
Subject: [PATCH] fdsa
---
Index: js/accessibility/pdom/ParallelDOM.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/accessibility/pdom/ParallelDOM.ts b/js/accessibility/pdom/ParallelDOM.ts
--- a/js/accessibility/pdom/ParallelDOM.ts (revision b5b1ed98b9546e6ee9c48f1394cc7a88203623d4)
+++ b/js/accessibility/pdom/ParallelDOM.ts (date 1672959367007)
@@ -131,7 +131,7 @@
import PhetioObject, { PhetioObjectOptions } from '../../../../tandem/js/PhetioObject.js';
import UtteranceQueue from '../../../../utterance-queue/js/UtteranceQueue.js';
import { TAlertable } from '../../../../utterance-queue/js/Utterance.js';
-import { Node, PDOMDisplaysInfo, PDOMInstance, PDOMPeer, PDOMTree, PDOMUtils, scenery, Trail } from '../../imports.js';
+import { Node, PDOMDisplaysInfo, PDOMInstance, PDOMPeer, PDOMTree, PDOMUtils, Rectangle, scenery, Trail } from '../../imports.js';
import { Highlight } from '../../overlays/HighlightOverlay.js';
import optionize from '../../../../phet-core/js/optionize.js';
import Tandem from '../../../../tandem/js/Tandem.js';
@@ -2573,6 +2573,13 @@
public setPositionInPDOM( positionInPDOM: boolean ): void {
this._positionInPDOM = positionInPDOM;
+ if ( positionInPDOM ) {
+ setTimeout( () => {
+ // insertChild for z order
+ this.parent.insertChild( 0, Rectangle.bounds( this.bounds, { stroke: 'red' } ) );
+ }, 30 );
+ }
+
for ( let i = 0; i < this._pdomInstances.length; i++ ) {
this._pdomInstances[ i ].peer!.setPositionInPDOM( positionInPDOM );
}
I directly tested dev.28 and immediately master with the above change and heard a very positive change! @Nancy-Salpepi can you please test on master and feel free to close if all is well. Furthermore note that the black VO highlight now mimics the focus higlight in the sim. In the future seeing those as different on mobile VO should be noted as a potential problem for many interactive elements, especially "custom" ones like books and rulers (in gravity force lab, another spot where this fix has been applied).
Thanks!@
Things look good on master. While testing I noticed another small bug, which I will post an issue for now. Sorry I didn't catch it the last time. I think I was too distracted with this issue.
Test device iPad 9th generation
Operating System iPadOS 16.1.1
Browser safari
Problem description For https://github.com/phetsims/qa/issues/868, when I double tap to grab the zoomed in book, I don't hear alerts like "Grabbed," "Lightly of physics book," or "Released." There is also a slight delay before I can actually move the Zoomed-in book. I don't see this with the non Zoomed-in book.
Steps to reproduce
Visuals
https://user-images.githubusercontent.com/87318828/210623961-fb824ed8-9566-44bd-83d0-3a009a5dc7a2.mov