IAccessible2: Evaluate "text-indent" attr for first line indent#17638
Merged
seanbudd merged 2 commits intoJan 23, 2025
Merged
Conversation
### Link to issue number: Fixes nvaccess#13052 ### Summary of the issue: NVDA did not announce the first line indent for paragraphs in LibreOffice Writer. ### Description of user facing changes NVDA supports the "text-indent" IAccessible2 object attribute. As a consequence, announcement of first line indent is now supported for LibreOffice 25.8 and later. ### Description of development approach Implement support for the "text-indent" object attribute as specified in the [IAccessible2 object attribute specification](https://github.com/LinuxA11y/IAccessible2/blob/master/spec/objectattributes.md), which references the [CSS spec](https://www.w3.org/TR/CSS2/text.html#propdef-text-indent) that explains: > This property specifies the indentation of the first line > of text in a block container. https://gerrit.libreoffice.org/c/core/+/180574 implements support in LibreOffice, i.e. reporting of that attribute by LibreOffice. This commit implements evaluation of that IAccessible2 object attribute by NVDA. As recommended in the IAccessible2 object attribute spec, LibreOffice reports the indentation in mm. Add a helper method that converts that to either cm or inches, depending on whether use of imperial measurements is enabled. ### Testing strategy: 1. start NVDA 2. open sample document https://bugs.documentfoundation.org/attachment.cgi?id=198672 in LibreOffice Writer (current development version also including above-mentioned LibreOffice change) 3. move focus to the second paragraph that has a first line indentation of 1 cm set 4. request announcement of text formatting by pressing NVDA+F 5. Make sure that what NVDA says includes the first line indent ("first line indent 1.00 centimetre") ### 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. <!-- Please keep the following --> @coderabbitai summary
seanbudd
approved these changes
Jan 22, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #13052
Summary of the issue:
NVDA did not announce the first line indent for paragraphs in LibreOffice Writer.
Description of user facing changes
NVDA supports the "text-indent" IAccessible2 object attribute. As a consequence, announcement of first line indent is now supported for LibreOffice 25.8 and later.
Description of development approach
Implement support for the "text-indent" object attribute as specified in the
IAccessible2 object attribute specification, which references the CSS spec that explains:
https://gerrit.libreoffice.org/c/core/+/180574 implements support in LibreOffice, i.e. reporting of that attribute by LibreOffice.
This commit implements evaluation of that IAccessible2 object attribute by NVDA.
As recommended in the IAccessible2 object attribute spec, LibreOffice reports the indentation in mm. Add a helper method that converts that to either cm or inches, depending on whether use of imperial measurements is enabled.
Testing strategy:
Known issues with pull request:
None
Code Review Checklist:
@coderabbitai summary