diff options
author | Jim Raykowski <raykowj@gmail.com> | 2022-09-08 19:27:31 -0800 |
---|---|---|
committer | Jim Raykowski <raykowj@gmail.com> | 2022-09-26 05:55:25 +0200 |
commit | 947fe0d89dee75ee43515ef7dfb43837d65a45bc (patch) | |
tree | 3fc8c819233f9c22abf7c8c896a6e08aa4fd90c0 /winaccessibility | |
parent | a6abe4a33568d87904fd49c734af4726878af421 (diff) |
tdf#119788 tdf#117173 add accessibility NOTIFICATION role
and use it to make screen readers announce notifications from the
'Find and Replace' dialog
Change-Id: Ifcf9304883e2e824ea1b7998d7767e474b87c8b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139709
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/service/AccComponentEventListener.cxx | 1 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 6 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 1 |
3 files changed, 6 insertions, 2 deletions
diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx index 83c29aad3d9e..ca0dec0fa311 100644 --- a/winaccessibility/source/service/AccComponentEventListener.cxx +++ b/winaccessibility/source/service/AccComponentEventListener.cxx @@ -177,6 +177,7 @@ void AccComponentEventListener::SetComponentState(sal_Int64 state, bool enable) // 8. label should have no FOCUSABLE state, Firefox has READONLY state, we can also have. if ( GetRole() != AccessibleRole::LABEL && GetRole() != AccessibleRole::STATIC + && GetRole() != AccessibleRole::NOTIFICATION && GetRole() != AccessibleRole::SCROLL_BAR) { pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::FOCUSABLE); diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx index 1f7dc5df224d..d1e805ce2428 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -145,7 +145,8 @@ const short ROLE_TABLE[][2] = {DOCUMENT_PRESENTATION, ROLE_SYSTEM_DOCUMENT }, {DOCUMENT_SPREADSHEET, ROLE_SYSTEM_DOCUMENT }, {DOCUMENT_TEXT, ROLE_SYSTEM_DOCUMENT }, - {STATIC, ROLE_SYSTEM_STATICTEXT } + {STATIC, ROLE_SYSTEM_STATICTEXT }, + {NOTIFICATION, ROLE_SYSTEM_ALERT} }; @@ -821,6 +822,7 @@ void AccObject::UpdateState() { case LABEL: case STATIC: + case NOTIFICATION: m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY ); break; case TEXT: @@ -859,7 +861,7 @@ void AccObject::UpdateState() if(!(Role == FILLER || Role == END_NOTE || Role == FOOTER || Role == FOOTNOTE || Role == GROUP_BOX || Role == RULER || Role == HEADER || Role == ICON || Role == INTERNAL_FRAME || Role == LABEL || Role == LAYERED_PANE || Role == SCROLL_BAR || Role == SCROLL_PANE || Role == SPLIT_PANE || Role == STATIC || Role == STATUS_BAR - || Role == TOOL_TIP)) + || Role == TOOL_TIP || Role == NOTIFICATION)) { if( SEPARATOR == Role ) { diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index 4967ecb4ee4e..44dbcb98ac3a 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -732,6 +732,7 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) case AccessibleRole::ICON: case AccessibleRole::LABEL: case AccessibleRole::STATIC: + case AccessibleRole::NOTIFICATION: case AccessibleRole::MENU_ITEM: case AccessibleRole::CHECK_MENU_ITEM: case AccessibleRole::RADIO_MENU_ITEM: |