Separate font attribute reporting between speech and braille#16748
Separate font attribute reporting between speech and braille#16748seanbudd merged 51 commits intonvaccess:masterfrom
Conversation
…speech, braille, and speech and braille. source/config/configSpec.py: Updated the configuration specification to use OutputMode as the type for documentFormatting.reportFontAttributes. Incremented schema version. source/config/profileUpgradeSteps.py: Added a profile upgrade step from 11 to 12. source/gui/settingsDialogs.py: Updated the settings GUI to reflect the change in config spec.
…speech, braille, and speech and braille. source/config/configSpec.py: Updated the configuration specification to use OutputMode as the type for documentFormatting.reportFontAttributes. Incremented schema version. source/config/profileUpgradeSteps.py: Added a profile upgrade step from 11 to 12. source/gui/settingsDialogs.py: Updated the settings GUI to reflect the change in config spec.
…om/SaschaCowley/nvda into formattingSeparateSpeechAndBraille
…as the value of reportFontAttributes. Implemented a test case for same.
…des that are now available
|
Thanks very much sascha for this nice work. |
See test results for failed build of commit eeecc628bd |
|
I know the PR is still in draft state. Though, I mention to get it known early: Moreover, in the case of document formatting config, there seems to be a quite strong link between NVDA's config ( |
This work is the first part of our push to improve font attribute support in braille. Since not all of the options in document formatting are supported in braille, not all of them are going to be converted just yet. We are working on supporting more attributes in braille, and the corresponding options will be updated when support is added. |
…d updated configUpgradeSteps accordingly.
…ntFormatting.fontAttributeReporting and back
…ocumentFormatting.reportFontAttributes
Thanks for this feedback. I've updated the PR to have a separate configuration key for this new type, which is transparently aliased to the old one.
These functions use |
See test results for failed build of commit 9738079287 |
Qchristensen
left a comment
There was a problem hiding this comment.
User guide changes look good. Great work.
… `fontAttributeReporting` (#17035) Partial fix for #16802 Summary of the issue: #16748 introduced new behaviour whereby NVDA can be configured to report font attributes in speech, braille, both or not at all. This required the implementation of a new configuration key, documentFormatting.fontAttributeReporting. To avoid a breaking change to the API, aliasing code was introduced to ensure that the new key and its deprecated counterpart were kept in sync. When the API version is updated, these tests will fail as this code will no-longer run. Therefore, these tests need to be removed. Description of user facing changes None. Description of development approach Deleted tests.unit.test_config.Config_getitem_alias.
Link to issue number:
Closes #16755
Summary of the issue:
NVDA only allows showing font attributes in both speech and braille, or not at all. Some users want this information reported in only one modality.
Description of user facing changes
Font attribute reporting can now be set to off, speech, braille, or speech and braille. The document formatting settings panel has been updated to use a dropdown box rather than a checkbox for "Report font attributes". The toggle report font attributes gesture now cycles among the 4 available options.
Description of development approach
Added a new enum,
OutputMode, to store the user's choice. An integer enum was chosen, as we want to enumerate the options. The values were chosen such that it is essentially a feature flag (i.e.,SPEECH= 1 andBRAILLE= 2), so that we can test for the bit we're interested in.Added a new configuration key,
documentFormatting.fontAttributeReporting, which uses this enum. Added a configuration migration that sets this new key toSPEECH_AND_BRAILLEifdocumentFormatting.reportFontAttributesisTrueandOFFif it'sFalse, so that without configuration modification there is no change to NVDA's behaviour.To maintain backwards compatibility, added an alias between
documentFormatting.reportFontAttributesanddocumentFormatting.fontAttributeReportingand vice-versa:documentFormatting.reportFormattingwill be set toTrueifdocumentFormatting.fontAttributeReportingis set toSPEECH,BRAILLE, orSPEECH_AND_BRAILLE, andFalseif it is set toOFF.documentFormatting.fontAttributeReportingwill be set toSPEECH_AND_BRAILLEifdocumentFormatting.reportFontAttributesis set toTrue, orOFFif it is set toFalse.Updated
speech/speech.pyandbraille.pyto check that the appropriate bit ofreportFontAttributesis set before outputting font attributes to that modality.Updated
script_toggleReportFontAttributesto cycle through the available modes, by incrementing the current value mod the number of possible values.Updated various places where
documentFormatting.reportFontAttributesis used as a bool to usedocumentFormatting.fontAttributeReportinginstead.Testing strategy:
Implemented unit tests for the configuration migration and the aliasing. Manually tested speech and braille output by testing bolded, italicised and underlined text in Word.
Known issues with pull request:
None
Code Review Checklist: