diff options
author | Samuel Thibault <sthibault@hypra.fr> | 2018-08-08 13:34:18 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-08-14 12:06:41 +0200 |
commit | 4917430c1c5e8105987e81d65d31df21955ad60e (patch) | |
tree | 83d242a3cb224327e5f984d6e093b47725e21f44 /winaccessibility | |
parent | ed77565f1487ed93e2557b562c10e0f4e8673c6a (diff) |
tdf#116542 a11y: introduce STATIC role
This should be used for brief non-editable text which is not meant to have a
relation with another object (as opposed to text or label).
Change-Id: I46bfa56042a51295e9fa0d332babdbb40668ff0b
Reviewed-on: https://gerrit.libreoffice.org/58734
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'winaccessibility')
-rw-r--r-- | winaccessibility/source/service/AccComponentEventListener.cxx | 1 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObject.cxx | 7 | ||||
-rw-r--r-- | winaccessibility/source/service/AccObjectWinManager.cxx | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/winaccessibility/source/service/AccComponentEventListener.cxx b/winaccessibility/source/service/AccComponentEventListener.cxx index bdbf0c2c3d66..148331acf6cd 100644 --- a/winaccessibility/source/service/AccComponentEventListener.cxx +++ b/winaccessibility/source/service/AccComponentEventListener.cxx @@ -176,6 +176,7 @@ void AccComponentEventListener::SetComponentState(short state, bool enable) pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC); // 8. label should have no FOCUSABLE state, Firefox has READONLY state, we can also have. if ( GetRole() != AccessibleRole::LABEL + && GetRole() != AccessibleRole::STATIC && 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 ed0ac90eebb7..eabed2cc219b 100644 --- a/winaccessibility/source/service/AccObject.cxx +++ b/winaccessibility/source/service/AccObject.cxx @@ -144,7 +144,8 @@ const short ROLE_TABLE[][2] = {COMMENT_END, IA2_ROLE_TEXT_FRAME }, {DOCUMENT_PRESENTATION, ROLE_SYSTEM_DOCUMENT }, {DOCUMENT_SPREADSHEET, ROLE_SYSTEM_DOCUMENT }, - {DOCUMENT_TEXT, ROLE_SYSTEM_DOCUMENT } + {DOCUMENT_TEXT, ROLE_SYSTEM_DOCUMENT }, + {STATIC, IA2_ROLE_TEXT_FRAME } }; @@ -880,6 +881,7 @@ void AccObject::UpdateState() switch(m_accRole) { case LABEL: + case STATIC: m_pIMAcc->IncreaseState( STATE_SYSTEM_READONLY ); break; case TEXT: @@ -918,7 +920,8 @@ 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 == STATUS_BAR || Role == TOOL_TIP)) + || Role == SCROLL_BAR || Role == SCROLL_PANE || Role == SPLIT_PANE || Role == STATIC || Role == STATUS_BAR + || Role == TOOL_TIP)) { if( SEPARATOR == Role ) { diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx index d5557d685539..f1ec48216ecb 100644 --- a/winaccessibility/source/service/AccObjectWinManager.cxx +++ b/winaccessibility/source/service/AccObjectWinManager.cxx @@ -825,6 +825,7 @@ AccObjectWinManager::CreateAccEventListener(XAccessible* pXAcc) case /*AccessibleRole::*/CHECK_BOX: case /*AccessibleRole::*/ICON: case /*AccessibleRole::*/LABEL: + case /*AccessibleRole::*/STATIC: case /*AccessibleRole::*/MENU_ITEM: case /*AccessibleRole::*/CHECK_MENU_ITEM: case /*AccessibleRole::*/RADIO_MENU_ITEM: |