-
-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MS Word documents: report when headings are collapsed in both speech …
…and braille. (#17499) Summary of the issue: In Microsoft Word, it is possible to collapse a heading, so that all the paragraphs directly following the heading are hidden. As of MS Word 16.0.18226, a new UIA text range custom attribute was added, to convey the expand collapse state of headings. NVDA should report when a heading is collapsed based on this value. Description of user facing changes In Microsoft Word, If a heading is collapsed, NVDA will now report this in speech and braille. Description of development approach * When fetching format information for a text range in MS Word via UIA, if the range supports the expand collapse custom attribute, expose the 'collapsed' key on its format field, setting it to true for collapsed, and false for expanded. * speech.getFormatfieldSpeech: speak "collapsed" when moving by line or paragraph over text with 'collapsed' set to true in its format field, or if it changes to true when moving by word / character. * In Braille, Report a plus (+) sign at the start of text that is collapsed according to its format field. Testing strategy: Tested with MS Word 16.0.18331. * Open a new document in Microsoft word. * Type an initial line of text. * Type a second line of text and format it as a heading (press alt+shift+rightArrow) * Type another line of text directly below it formatted as a normal paragraph. * Arrow up to the heading, noting that the heading is spoken / braille dnormally (I.e. heading level 2 test). No expand / collapse info is reported. * Collapse the heading by choosing collapse in the context menu. * Arrow up and back down to read the heading. Note that NvDA now reports 'collapsed' in speech and a plus (+) sign in braille. Known issues with pull request: None known. This implementation only reports when a heading is collapsed, and not explicitly when expanded. However, as expanded headings will far outweigh collapsed, I think it would be way too noisy to report expanded, when that is going to be the norm.
- Loading branch information
1 parent
0be66d5
commit fa619c2
Showing
7 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters