Command to dismiss braille focus when Escape is pressed while braille mode
is active. The exit path depends on whether the figure has multiple panels.
Multi-panel figures reach braille from TRACE scope (plotContext depth 3), so
exitSubplot() succeeds and we return to the subplot level via a
screen-reader-safe sequence:
dismissModalScope moves focus to the plot and clears the focus stack,
exitSubplot transitions the navigation context to the subplot level,
notifyFocusChange defers the UI update (textarea removal) so NVDA/JAWS
process the focus change before the braille textarea unmounts.
Single-panel figures have no subplot level to return to (exitSubplot() would
be a no-op that leaves the scope stuck in BRAILLE), so we instead replay the
'b' key path: toggling braille off pops BRAILLE off the focus stack and
restores TRACE scope, focus stack, and UI consistently.
Command to dismiss braille focus when Escape is pressed while braille mode is active. The exit path depends on whether the figure has multiple panels.
Multi-panel figures reach braille from TRACE scope (plotContext depth 3), so exitSubplot() succeeds and we return to the subplot level via a screen-reader-safe sequence:
Single-panel figures have no subplot level to return to (exitSubplot() would be a no-op that leaves the scope stuck in BRAILLE), so we instead replay the 'b' key path: toggling braille off pops BRAILLE off the focus stack and restores TRACE scope, focus stack, and UI consistently.