diff --git a/js/accessibility/voicing/InteractiveHighlighting.ts b/js/accessibility/voicing/InteractiveHighlighting.ts index 4387e092d..5b27f97d8 100644 --- a/js/accessibility/voicing/InteractiveHighlighting.ts +++ b/js/accessibility/voicing/InteractiveHighlighting.ts @@ -21,7 +21,7 @@ const INTERACTIVE_HIGHLIGHTING_OPTIONS = [ ]; type InteractiveHighlightingSelfOptions = { - interactiveHighlight?: Node | Shape | null, + interactiveHighlight?: Node | Shape | null | 'invisible', interactiveHighlightLayerable?: boolean }; @@ -59,7 +59,7 @@ const InteractiveHighlighting = ( Type: SuperType // The highlight that will surround this Node when it is activated and a Pointer is currently over it. When // null, the focus highlight will be used (as defined in ParallelDOM.js). - _interactiveHighlight: Shape | Node | null; + _interactiveHighlight: Shape | Node | null | 'invisible'; // If true, the highlight will be layerable in the scene graph instead of drawn // above everything in the HighlightOverlay. If true, you are responsible for adding the interactiveHighlight @@ -134,7 +134,7 @@ const InteractiveHighlighting = ( Type: SuperType * Set the interactive highlight for this node. By default, the highlight will be a pink rectangle that surrounds * the node's local bounds. */ - setInteractiveHighlight( interactiveHighlight: Node | Shape | null ) { + setInteractiveHighlight( interactiveHighlight: Node | Shape | null | 'invisible' ) { if ( this._interactiveHighlight !== interactiveHighlight ) { this._interactiveHighlight = interactiveHighlight; @@ -152,16 +152,16 @@ const InteractiveHighlighting = ( Type: SuperType } } - set interactiveHighlight( interactiveHighlight: Node | Shape | null ) { this.setInteractiveHighlight( interactiveHighlight ); } + set interactiveHighlight( interactiveHighlight: Node | Shape | null | 'invisible' ) { this.setInteractiveHighlight( interactiveHighlight ); } /** * Returns the interactive highlight for this Node. */ - getInteractiveHighlight(): Node | Shape | null { + getInteractiveHighlight(): Node | Shape | null | 'invisible' { return this._interactiveHighlight; } - get interactiveHighlight(): Node | Shape | null { return this.getInteractiveHighlight(); } + get interactiveHighlight(): Node | Shape | null | 'invisible' { return this.getInteractiveHighlight(); } /** * Sets whether the highlight is layerable in the scene graph instead of above everything in the diff --git a/js/overlays/HighlightOverlay.js b/js/overlays/HighlightOverlay.js index ce9c632bf..a1faf650e 100644 --- a/js/overlays/HighlightOverlay.js +++ b/js/overlays/HighlightOverlay.js @@ -233,7 +233,7 @@ class HighlightOverlay { * * @param {Trail} trail - The focused trail to highlight. It assumes that this trail is in this display. * @param {Node} node - Node receiving the highlight - * @param {Node|Shape|null} nodeHighlight - the highlight to use + * @param {Node|Shape|null|'invisible'} nodeHighlight - the highlight to use * @param {boolean} layerable - Is the highlight layerable in the scene graph? * @param {BooleanProperty} visibleProperty - Property controlling the visibility for the provided highlight */