summaryrefslogtreecommitdiff
path: root/winaccessibility
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2021-09-01 16:25:01 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2021-09-01 23:57:55 +0200
commite29f80efc826fdc8a8e4b7cbdd3becf2f074cce4 (patch)
treec8ea50e75df3c7145a523dcf36e008f257505970 /winaccessibility
parent8887979092c88139e4b950d1a75fc576853a2e2c (diff)
tdf#135588 wina11y: Map AccessibleRole::STATIC to ROLE_SYSTEM_STATICTEXT
This looks like a better match to me than the previously used 'IA2_ROLE_TEXT_FRAME' and the NVDA screen reader reads the text of child objects of 'ROLE_SYSTEM_STATICTEXT' when announcing their parent objects if they have a specific role (e.g. 'ROLE_SYSTEM_PANE' or 'ROLE_SYSTEM_GROUPING'). Description for 'ROLE_SYSTEM_STATICTEXT' from [1]: > The object represents read-only text, such as labels for other controls > or instructions in a dialog box. Static text cannot be modified or > selected. Description for 'IA2_ROLE_TEXT_FRAME' from [2]: > Collection of objects that constitute a logical text entity. With this and an additional change to make the NVDA screen reader speak the children of a VclBox, NVDA reads the complete text of MessageDialogs as they are shown, rather than just the dialog title. ('AccessibleRole::STATIC' is used for the readonly VCLMultiLineEdits in a MessageDialog, s. 'VCLXAccessibleEdit::implGetAccessibleRole'.) The additional change needed to fix tdf#135588 when using NVDA on Windows is to make sure that 'AccessibleRole::PANEL' (used for a VclBox on Windows, s. commit 685ec1899435037205d98a102a32ca8b6a4836d0 Date: Mon Feb 17 16:57:44 2014 +0000 Related: fdo#74284 try AccessibleRole::PANEL for VclBoxes under windows Change-Id: Ic8c743c2646c8610b3d90425024413b40dfdab13 and additional information in fdo#74284) is mapped to something for which NVDA descends into the children. Testing this by just changing the LibreOffice side can be done by adapting the mapping for 'AccessibleRole::PANEL' to 'ROLE_SYSTEM_PANE' like this: diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 9e3f7d063b3b..e0ae1e2dc03e 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -98,7 +98,7 @@ const short ROLE_TABLE[][2] = {OPTION_PANE , IA2_ROLE_OPTION_PANE}, {PAGE_TAB, ROLE_SYSTEM_PAGETAB}, {PAGE_TAB_LIST, ROLE_SYSTEM_PAGETABLIST}, - {PANEL, IA2_ROLE_OPTION_PANE}, + {PANEL, ROLE_SYSTEM_PANE}, {PARAGRAPH, IA2_ROLE_PARAGRAPH}, {PASSWORD_TEXT, ROLE_SYSTEM_TEXT}, {POPUP_MENU, ROLE_SYSTEM_MENUPOPUP}, Adapting NVDA as follows to handle 'controlTypes.ROLE_OPTIONPANE' accordingly might be a better approach, though: diff --git a/source/NVDAObjects/behaviors.py b/source/NVDAObjects/behaviors.py index e51f9e4a3..47389186e 100755 --- a/source/NVDAObjects/behaviors.py +++ b/source/NVDAObjects/behaviors.py @@ -89,6 +89,7 @@ class Dialog(NVDAObject): continue #For particular objects, we want to descend in to them and get their children's message text if childRole in ( + controlTypes.ROLE_OPTIONPANE,^M controlTypes.ROLE_PROPERTYPAGE, controlTypes.ROLE_PANE, controlTypes.ROLE_PANEL, I'll discuss that in the corresponding NVDA issue on GitHub: [3] [1] https://docs.microsoft.com/en-us/windows/win32/winauto/object-roles [2] https://accessibility.linuxfoundation.org/a11yspecs/ia2/archive/ia2-1.0.2/docs/html/_accessible_role_8idl.html#e37ff81431ee3762a5d41a2cb909108d73becd811853026681d0000b17da7862 [3] https://github.com/nvaccess/nvda/issues/11687 Change-Id: Ic49d49cfc2d5f01646086931f9f8a522c6f0d5fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121476 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r--winaccessibility/source/service/AccObject.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index 0763b4520a9c..9e3f7d063b3b 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -146,7 +146,7 @@ const short ROLE_TABLE[][2] =
{DOCUMENT_PRESENTATION, ROLE_SYSTEM_DOCUMENT },
{DOCUMENT_SPREADSHEET, ROLE_SYSTEM_DOCUMENT },
{DOCUMENT_TEXT, ROLE_SYSTEM_DOCUMENT },
- {STATIC, IA2_ROLE_TEXT_FRAME }
+ {STATIC, ROLE_SYSTEM_STATICTEXT }
};