Report multiple routing selection in browse mode (#21086)
Fixup for #20028. Reported privately by @dkager.
Summary of the issue:
Since 2026.3, pressing multiple routing keys selects the text between them on supported displays.
In browse mode, for example in Chrome, the text is selected, but braille doesn't underline selection, and speech doesn't announce it.
Description of user facing changes:
When selecting text in browse mode with multiple routing keys, NVDA now announces the selection and shows it on the braille display.
When a selection is not possible, NVDA now reports why:
"No selectable text under routing keys": neither key is on selectable text, for example on a button.
"Selection must start and end in text": only one key is on selectable text, for example when the other is on a label.
"Unable to select text in this control": both keys are on text, but the text control does not support selection.
Description of developer facing changes:
None.
Description of development approach:
The command selects by calling updateSelection() on a TextInfo.
In a browse mode document, this only changes the document's own selection.
Browse mode gets no selection event from the application, so nothing reports the change.
Editable controls such as Notepad++ do get such an event, and announce the selection themselves.
The command now follows the review cursor copy command (script_review_copy).
When the object has a reportSelectionChange method, the command saves the object's selection before selecting, and calls that method afterwards.
For a browse mode document, CursorManager.reportSelectionChange speaks the selection change and updates braille.
Objects that detect selection changes themselves have no such method, so they are not announced twice.
A routing key outside a text region gives no TextInfo.
The command uses this to tell the failures apart: neither key is on text, or only one is.
NVDA adds at most one text region to a braille buffer, so two keys on text are always on the same object.