Reduce verbosity when reporting Excel cell formatting#15560
Conversation
869d664 to
311d659
Compare
Have you tried to implement the same fix for UIA and encountered some difficulties, or is that because when accessing Excel via UIA this problem does not occur? |
The problem of such verbosity is not present with UIA. But with UIA, there seem to be an error with this build when requesting formatting info; this error does not occur in alpha build. Converting to draft to clarify this. |
Initial description updated now.
There was actually no error; tests probably not executed correctly the first time. |
| backgroundPattern=attrs.get("background-pattern") | ||
| oldBackgroundPattern=attrsCache.get("background-pattern") if attrsCache is not None else None | ||
| if (backgroundPattern or oldBackgroundPattern is not None)and backgroundPattern != oldBackgroundPattern: | ||
| if (backgroundPattern or oldBackgroundPattern is not None) and backgroundPattern != oldBackgroundPattern: |
There was a problem hiding this comment.
Thanks for the linting. But why hasn't it been detected by appVeyor check?
Link to issue number:
None
Summary of the issue:
When requesting for cell formatting information in Excel (NVDA+F), there is over-verbose information:
Description of user facing changes
When formatting information is requested with NVDA+F, we will not report anymore a lack of specific formatting for border lines or for background pattern. This formatting will still be reported during navigation if the corresponding option is enabled in document formatting settings (respectively "cell borders" and "color").
In that sense, we follow the logic used for other formatting attributes that have a negative state (lack of such formatting) such as bold/italic/etc. E.g.: "no bold" is not formatted upon NVDA+F request, but it is still reported while navigating from bold to no bold if the corresponding doc formatting option is enabled.
Description of development approach
Do not provide info on background pattern in formatting info fields and changed the logic in
speech.pyto handle this.For UIA, nothing is done since NVDA does not report borders or background pattern for Excel cells when UIA is enabled.
Additional note
_getFormatFieldAndOffsetsis private but it's probably called bygetTextWithFields, thus changing its result.Thus should I indicate something in API breaking changes though?
Testing strategy:
Manual test: Tested NVDA+F and navigation with option "color" and "cell borders" enabled.
Known issues with pull request:
None
Code Review Checklist: