Indicate font attributes in braille with tags#16864
Conversation
…lay method before calculating liblouis typeforms
…d strikethrough Added a config flag for the tags display mode
…ring as it is more performant
See test results for failed build of commit a40a1c3f2a |
…ributes if the user has font attributing set to braille or speech and braille
|
This is a very interesting piece of work, thank you for this Sascha.
This could be combined with the touch sensible braille displays where you could press on a character twice or press and hold, and the formating tag appears for a short period of time afterwards. I am not sure whether braille display vendors are working on different behaviors of cursor routing (e.g. press multiple times, press and hold, double press and hold etc. which could give you more information about the word / character / selected text). |
|
Thank you for this useful pr. Couple of notes: Write for example line: This is a test line. Bold "This is". Go to start of line, and select it with shift+end. Selection starts from "T" and ends in the end of line thus covering also end tag of bold. But start tag is shown as not selected. Empty document again, then:
Sometimes start tag is not shown in braille. I tested with word 2019, and "use UIA" is default in nvda advanced settings. |
|
I think that one additional mode could be indicate all attributes with dots 7 and 8. This could also contain links as well. Advantage would be that additional information would not require extra space. If user would be interested whatkinds of additional information is in question, he/she could switch to "tag mode" or use "report formatting information for the text under this braille cell" gesture. So adding gesture for changin "indicating font attribute mode" would be useful. |
|
I do also prefer dots 7 and 8 for the same reason that @burmancomp has described and a gesture for additional information when needed. |
|
@Adriani90 said:
Adding this behaviour would be out of scope for this PR. Could you open a new issue and reference this PR (or just mention the new behaviour)? |
|
@burmancomp said:
This is not unique to this work. For instance: (keyboard shortcuts likely vary if you're not using Word in English)
This is because of the way we show selection in braille, and would require changes that are out of scope for this issue. If you like, you can search to see if there's an issue open for this, and, if not, open one. |
Co-authored-by: Cyrille Bougot <cyrille.bougot2@laposte.net>
See test results for failed build of commit 504374c1ae |
Yes, you are right. As to my other note maybe you would like to consider it. |
|
@burmancomp said:
I am unable to reproduce this, could you please give more concrete reproduction steps? |
|
@burmancomp, @Jykke67, using dots 7 and/or 8 to indicate formatting is a feature that has already been requested. It is technically more difficult to implement, but is something we're looking in to. |
Let's try with this:
then:
Only start tag is shown for "link 2.". Then:
I have windows 11 with word 2019 (not 365). |
|
@burmancomp, this is exactly the same behaviour as we get in speech: |
Link to issue number:
Closes #16863
Summary of the issue:
Braille users are currently limited in terms of the type of formatting attributes they can read in Braille: only bold, italics and underline are supported, and only if their chosen braille table supports the LibLouis emphasis codes for those attributes.
Description of user facing changes
Users can now configure NVDA to use starting and ending tags for bold, italics, underline and strike through. Users need to explicitly enable the new behaviour, the default is for font attributes to be displayed using native braille (if supported by the LibLouis table in use).
Description of development approach
Added a new
FeatureFlagEnumthat currently supports LibLouis and tags output modes, with the default being LibLouis. Added a control to the braille config to allow users to set their preferred display mode.Updated
braille.getFormatFieldBrailleto generate a tag for formatting changes (via a private helper function). This new code is not called unless the user's preference is the new tags mode.Updated
braille.TextInfoRegion._getTypeformFromFormatFieldto returnlouis.plain_textif the user's preference is not to use LibLouis, in addition to the existing checks.Testing strategy:
Tested the various available options for formatting display style (LibLouis, tags and default) with the options for output mode (off, speech, braille and speech and braille) to ensure the behaviour was as expected. Tested with various combinations of bold, italics, underline and strikethrough in Word.
Known issues with pull request:
Code Review Checklist:
Summary by CodeRabbit
New Features
Enhancements
Documentation