Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soffice: Make status bar announcement work for dialogs, LO >= 24.2 #15592

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 13 additions & 6 deletions source/appModules/soffice.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,13 @@ def searchStatusBar(self, obj: NVDAObject, max_depth: int = 5) -> Optional[NVDAO
(up to the given depth) has the corresponding role."""
if obj.role == controlTypes.Role.STATUSBAR:
return obj
if max_depth < 1 or obj.role not in {controlTypes.Role.ROOTPANE, controlTypes.Role.WINDOW}:
if max_depth < 1 or obj.role not in {
controlTypes.Role.DIALOG,
controlTypes.Role.FRAME,
controlTypes.Role.OPTIONPANE,
controlTypes.Role.ROOTPANE,
controlTypes.Role.WINDOW
}:
return None
for child in obj.children:
status_bar = self.searchStatusBar(child, max_depth - 1)
Expand All @@ -402,9 +408,10 @@ def _get_statusBar(self) -> Optional[NVDAObject]:
def getStatusBarText(self, obj: NVDAObject) -> str:
text = ""
for child in obj.children:
textObj = child.IAccessibleTextObject
if textObj:
if text:
text += " "
text += textObj.textAtOffset(0, IA2.IA2_TEXT_BOUNDARY_ALL)[2]
if hasattr(child, 'IAccessibleTextObject'):
textObj = child.IAccessibleTextObject
if textObj:
if text:
text += " "
text += textObj.textAtOffset(0, IA2.IA2_TEXT_BOUNDARY_ALL)[2]
return text
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This option now announces additional relevant information about an object when t
- The SAPI4 synthesizer now properly supports volume, rate and pitch changes embedded in speech. (#15271)
- Multi line state is now correctly reported in applications using Java Access Bridge. (#14609)
- In LibreOffice, words deleted using the ``control+backspace`` keyboard shortcut are now also properly announced when the deleted word is followed by whitespace (like spaces and tabs). (#15436)
- In LibreOffice, announcement of the status bar using the ``NVDA+end`` keyboard shortcut now also works for dialogs in LibreOffice version 24.2 and newer. (#15591)
-

== Changes for Developers ==
Expand Down