Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soffice: Report keyboard-triggered font size change
### Link to issue number: Partially implements feature requests from #6915 ### Summary of the issue: commit 46a3436 ("soffice: Report keyboard-triggered formatting toggles in Writer (#16413)") implemented announcement of formatting changes triggered by keyboard shortcuts for formatting attributes whose state is represented by toggle buttons in Writer's formatting toolbar. Issue #6915 requests announcement of further text formatting attributes that are not represented by simple toggle buttons. This includes decreasing/increasing the font size, which can be done using the Ctrl+[ and Ctrl+] shortcuts when using an English (US) UI and keyboard layout. ### Description of user facing changes When decreasing or increasing the font size in LibreOffice Writer using the corresponding keyboard shortcuts, NVDA announces the new font size. ### Description of development approach Extend the solution from the above-mentioned commit 46a3436 to not only cover toggle buttons, but also UI controls implementing the IAccessibleText interface and handle the gestures/keyboard shortcuts for changing the font size: * Rename methods and variables introduced earlier to not have button-specific names. * Extract some logic to helper methods/classes to avoid duplication in `SymphonyButton` and the newly introduced `SymphonyText` logic. * Add Ctrl+[ and Ctrl+] to the list of keyboard gestures to handle. * Add `SymphonyText.event_valueChange` override that announces the new value. This gets triggered when the value of the "Font Size" editable combobox in Writer's formatting toolbar changes after using the keyboard shortcut, and results in the new value being announced, e.g. "14 pt". This is comparable to the handling in `SymphonyButton.event_stateChange` introduced in the earlier above-mentioned commit. * Increase the timeout for announcement of events from 0.15 to 2 seconds, as 0.15 seconds wasn't always sufficient when testing the new feature. ### Testing strategy: 1. start NVDA 2. start LibreOffice Writer (with English UI and keyboard layout) 3. Press Ctrl+[ to decrease the font size 4. Verify that NVDA announces the new font size, e.g. "10 pt" when using the default document template 5. Press Ctrl+] to increase the font size 4. Verify that NVDA announces the new font size, e.g. "12 pt" when using the default document template 5. repeat the tests mentioned in commit 46a3436 to verify the toggle button case still works as expected ### Known issues with pull request: None ### Code Review Checklist: - [x] Documentation: - Change log entry - User Documentation - Developer / Technical Documentation - Context sensitive help for GUI changes - [x] Testing: - Unit tests - System (end to end) tests - Manual testing - [x] UX of all users considered: - Speech - Braille - Low Vision - Different web browsers - Localization in other languages / culture than English - [x] API is compatible with existing add-ons. - [x] Security precautions taken.
- Loading branch information