tdf#117173 wina11y: Send EVENT_SYSTEM_ALERT when notification shows
Together with Change-Id Ifcf9304883e2e824ea1b7998d7767e474b87c8b6 ("tdf#119788 tdf#117173 add accessibility NOTIFICATION role") and Change-Id Id62b3942dc17c3a1ed6a08d23438406e5a19c39d ("tdf#117173 a11y: Send SHOWING state change event on Window{Show,Hide}"), this makes NVDA announce the notification in the Search and Replace dialog as an alert, similar to what browsers do e.g. in the alert on empty input for the input validation example at https://www.w3.org/WAI/tutorials/forms/validation/ . Change-Id: I3263df4711f84a6dd9e178aaaaad340b128aa074 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140091 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -237,6 +237,7 @@ void AccComponentEventListener::FireStatePropertyChange(sal_Int64 state, bool se
|
||||
pAgent->DecreaseState(m_xAccessible.get(), AccessibleStateType::DEFUNC);
|
||||
// UNO !SHOWING == MSAA OFFSCREEN
|
||||
pAgent->IncreaseState(m_xAccessible.get(), AccessibleStateType::SHOWING );
|
||||
pAgent->NotifyAccEvent(UnoMSAAEvent::STATE_SHOWING, m_xAccessible.get());
|
||||
break;
|
||||
case AccessibleStateType::VISIBLE:
|
||||
// UNO !VISIBLE == MSAA INVISIBLE
|
||||
|
@@ -198,6 +198,11 @@ bool AccObjectWinManager::NotifyAccEvent(XAccessible* pXAcc, UnoMSAAEvent eEvent
|
||||
UpdateAccFocus(pXAcc);
|
||||
NotifyWinEvent( EVENT_OBJECT_FOCUS,hAcc, OBJID_CLIENT,dChildID );
|
||||
break;
|
||||
case UnoMSAAEvent::STATE_SHOWING:
|
||||
// send EVENT_SYSTEM_ALERT when notification gets shown
|
||||
if (pRContext->getAccessibleRole() == AccessibleRole::NOTIFICATION)
|
||||
NotifyWinEvent(EVENT_SYSTEM_ALERT, hAcc, OBJID_CLIENT, dChildID);
|
||||
break;
|
||||
case UnoMSAAEvent::MENU_START:
|
||||
NotifyWinEvent( EVENT_SYSTEM_MENUSTART,hAcc, OBJID_CLIENT,dChildID );
|
||||
break;
|
||||
|
Reference in New Issue
Block a user