Accessibility Mac: Implement accessibilityFocusedUIElement

Change-Id: I17b5b1f741a8b340d8f4b16f4ec39cc9a8159bfa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Frederik Gladhorn 2013-04-03 21:33:16 +02:00 committed by The Qt Project
parent 00b11ccdea
commit d257e69a79

View File

@ -106,9 +106,27 @@
// Hit a child, forward to child accessible interface.
QAccessible::Id childAxid = QAccessible::uniqueId(childInterface);
// FIXME: parent could be wrong
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithId:childAxid parent:self ];
[accessibleElement autorelease];
return [accessibleElement accessibilityHitTest:point];
}
- (id)accessibilityFocusedUIElement {
if (!m_window->accessibleRoot())
return [super accessibilityFocusedUIElement];
QAccessibleInterface *childInterface = m_window->accessibleRoot()->focusChild();
if (childInterface) {
QAccessible::Id childAxid = QAccessible::uniqueId(childInterface);
// FIXME: parent could be wrong
QCocoaAccessibleElement *accessibleElement = [QCocoaAccessibleElement createElementWithId:childAxid parent:self];
[accessibleElement autorelease];
return accessibleElement;
}
// should not happen
return nil;
}
@end