nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 637 forks source link

braille: show selection in edit controls and documents when tethered to review #15994

Closed burmancomp closed 3 months ago

burmancomp commented 10 months ago

Is your feature request related to a problem? Please describe.

Although "show selection" is enabled, NVDA does not show selection automatically in braille when braille is tethered to review. Fortunately issue #15844 and pr #15858 are available.

Describe the solution you'd like

NVDA should show selection automatically when "show selection" is enabled.

Describe alternatives you've considered

When within selection, ReviewTextInfoRegion._getSelection should return reading unit which braille is showing, review position otherwise. It should also save current selection for use in TextInfoRegion.update to handle the case where selection is partial reading unit.

update, nextLine and previousLine should be defined in ReviewTextInfoRegion to properly move to the next and previous line and to scroll forward and back, when selection is shown.

Additional context

"show selection" is available in braille settings when braille is tethered to review although selection is not shown in braille then.

Jykke67 commented 10 months ago

Yes. The selected area is shown correctly in your test version of NVDA, so even the TC buttons. Therefore this feature should be implemented in future versions of NVDA.

irrah68 commented 10 months ago

This would be a very useful feature in future releases of NVDA. I tried a test version compiled by @burmancomp and it seems to work. I always use Tether Braille to review setting and now it is possible to select text areas and see what is selected. The touch cursor keys work correctly. I can also navigate out of selected text and navigate back using Braille display's keys, and the selected text is shown unless I press a touch cursor or — for example — the arrow keys of the keyboard. I tested this in browse mode and in Notepad++ text editor.

michaelDCurran commented 10 months ago

Braille was originally designed so that only one cursor (expanded or collapsed) would be shown on the display. E.g. when tethered to review, you would only see the review cursor. When tethered to focus, yoyou would only see caret / selection (expanded caret). I would bee curious to see any prototype of this idea so that I can get a better idea of what the UX would feel like.

burmancomp commented 10 months ago

Solution has limitations but on the other hand tethering braille to review gives more possibilities, and showing selection should be one of them. Can I open pull request for prototype?

seanbudd commented 10 months ago

Feel free to open a draft PR

burmancomp commented 7 months ago

Do I close this issue?

Adriani90 commented 7 months ago

No, this is still valid. The solution though needs a redesign as documented in the closed PR.

burmancomp commented 6 months ago

I have another version which does not depend on scripts and _getSelection just returns TextInfo. Logic what it returns is in helper function and update function.

If decision is that this feature requires anyway larger redesign then I do not open new pr.

seanbudd commented 6 months ago

@burmancomp - it is hard to provide feedback without more information on the approach. I would encourage either a more clear explanation or a draft PR again

burmancomp commented 3 months ago

I am closing this issue. There is add-on "Show selection when braille is tethered to review" in development category. You can test it at your own risk. Suggestions are welcome.