Closed jessegreenberg closed 3 years ago
It looks like the alerts that are getting used in startDrag
and endDrag
are being overridden in SliderUnit after changes that were needed for #210.
This diff seemed to fix it but I am not sure what is best, can you take a look @zepumph?
diff --git a/js/resistance-in-a-wire/view/SliderUnit.js b/js/resistance-in-a-wire/view/SliderUnit.js
index 81d24cc..6875be2 100644
--- a/js/resistance-in-a-wire/view/SliderUnit.js
+++ b/js/resistance-in-a-wire/view/SliderUnit.js
@@ -67,14 +67,14 @@ function SliderUnit( property, range, symbolString, nameString, unitString, labe
}, options );
// override the start and end drag functions in the options
- const providedStartDragFunction = options.sliderOptions.startDrag;
+ const providedStartDragFunction = options.startDrag;
options.sliderOptions.startDrag = function( event ) {
if ( event.type === 'keydown' ) {
self.keyboardDragging = true;
}
providedStartDragFunction && providedStartDragFunction();
};
- const providedEndDragFunction = options.sliderOptions.endDrag;
+ const providedEndDragFunction = options.endDrag;
options.sliderOptions.endDrag = function() {
self.keyboardDragging = false;
providedEndDragFunction && providedEndDragFunction();
This is still an issue. I am not getting context responses when adjusting the sliders in the A11y View or when using Voice Over.
I was using was 1.70-dev.4 on PhET Marks.
This is my fault, I forgot to assign, apologies. Anyway, I reviewed #210 and https://github.com/phetsims/resistance-in-a-wire/commit/3dea6fc91241899736a1b79a29b97b16d979a7e2 and I am pretty certain that https://github.com/phetsims/resistance-in-a-wire/issues/213#issuecomment-609973260 is correct.
This is fixed with the above commit @terracoda can you please verify?
Thank you @jessegreenberg. The context responses are firing now :-)
Noticed while working on #212, I am not seeing any alerts in this sim other than "reset" alert in the a11y view.