show result of report current focus, navigator object, and selection in braille#15858
Conversation
|
As to showing selection in braille when braille is tethered to review, it should be possible to see selection directly when navigating right/left/up/down, when "show selection" is enabled in braille category. |
|
@burmancomp I agree, but for some reason when braille is tethered to review, it says that brlRegions[-1].selectionStart and selectionEnd is None even though some text are selected in the control. I have no idea why it happens |
See test results for failed build of commit 75493e59ab |
|
I do not have solution. If you comment and then you notice that unit is "line" or "paragraph". |
|
@burmancomp As I litterarly have no idea how to proceed, and since at least with this change, you can check the selection when braille is tethered to review by executing the reportSelection script, i am marking this as ready for review. Isn't it better if you create an issue that describes the exact problem and your prefered solution for it? |
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Co-authored-by: Sean Budd <seanbudd123@gmail.com>
Possibility to check selection is always better than not to check it at all. I suppose we both would prefer that one could navigate up/down/right/left, and if there is selection braille would indicate it without extra steps, and similarly when selecting text braille should automatically show selection. I have no other solution at this moment (maybe never), and I do not know how much work it would require. I am quite sure that @LeonarddeR have some thoughts about what is possible with moderate workload with current braille module. |
|
@Emil-18 it may likely take time to find and implement alternative solution, and because it is not available, it cannot be evaluated. I would suggest that you would add browseable message alternative for example like in scripts |
Co-authored-by: Leonard de Ruijter <3049216+LeonarddeR@users.noreply.github.com>
…to brailleReporting
See test results for failed build of commit ac2dd66ff6 |
Link to issue number:
fixes #15844
Summary of the issue:
The report current focus and navigator object commands reports more information then NVDA normaly does by navigating to an object. Because of this, A user that only uses braille is unable to get this information. They are also unable to see acuratly what is selected if the selection is grater then one line, because when tethered to review, the selection information for text is lost, and when tethered to focus, the text is un selected when moving up or down a line.
Description of user facing changes
A user that only uses braille will be able to get the information described above
Description of development approach
I changed both the report focus and navigator object scripts, so that instead of calling speakObject, they call getObjectSpeech and saves its return value.
It then uses speech.speech.speak to speak this information
I then go over the list and remove every item that isn't a string, and then joins it with ' '.join
I then show this string in braille
In the reportCurrentSelection script, I get the information spoken using the _getSelectionMessageSpeech function, then show it in braille
Testing strategy:
I tested the report current focus and navigator scripts. Both worked as expected. I tested the report selection script in a situation where it was no selection, in a situation where the selection was small enough to be reported by NVDA, and in a situation where it was large enough that NVDA reported the number of characters selected. It worked in all those cases
Known issues with pull request:
None so far
Code Review Checklist: