nvda
45402bc5 - soffice: Use SymphonyText only for objects with specific roles (#17221)

Commit
1 year ago
soffice: Use SymphonyText only for objects with specific roles (#17221) Fixes #17218 Summary of the issue: When a checkbox in LibreOffice receives focus, the current state (checked/unchecked) of the checkbox was not reported in braille, while it was in speech. This is due to the NVDA's braille logic using a concept of multiple "focus regions"/potential strings to display, and reporting only the one that's considered the most relevant on the braille display. If an object is considered to have "useful text", that text is given a higher priority than the default logic for checkboxes (see braille.getFocusRegions). While the latter does include the checkbox state, the former doesn't. An object is (among others) considered to have useful text if it is an EditableText instance (see NVDAObjectHasUsefulText). So far, the SymphonyText overlay class was used for objects implementing the IAccessibleText interface in the LibreOffice app module, regardless of their role, which meant that the overlay class would also be used for checkboxes. As SymphonyText subclasses EditableText, the text/label of the checkbox was reported on the braille display, which doesn't include the checkbox state. Description of user facing changes In LibreOffice, the current checkbox state (checked/unchecked) is now also reported in braille, not just speech. Description of development approach Limit the use of the SymphonyText overlay class to objects with corresponding roles: EDITABLETEXT and HEADING For objects with a PARAGRAPH role, SymphonyParagraph already gets used. This prevents overriding the default logic for reporting objects, including that for checkboxes. While at it, also add BLOCKQUOTE to the set of roles for which to use SymphonyParagraph, as the block quote role is used for paragraphs in Writer using the "Block Quotation" paragraph style since LibreOffice commit https://git.libreoffice.org/core/commit/b7d2a9c824aca1a4dfd1b857a3620e73ade6bc0d .
Parents
Loading