diff --git a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm index 0cac68f4213..7cab078c64c 100644 --- a/src/plugins/platforms/cocoa/qcocoaaccessibility.mm +++ b/src/plugins/platforms/cocoa/qcocoaaccessibility.mm @@ -57,6 +57,9 @@ void QCocoaAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event) NSAccessibilityPostNotification(element, NSAccessibilityFocusedUIElementChangedNotification); break; } + case QAccessible::PopupMenuStart: + NSAccessibilityPostNotification(element, NSAccessibilityFocusedUIElementChangedNotification); + break; case QAccessible::StateChanged: case QAccessible::ValueChanged: case QAccessible::TextInserted: @@ -221,7 +224,8 @@ bool shouldBeIgnored(QAccessibleInterface *interface) role == QAccessible::Application || // We use the system-provided application element. role == QAccessible::ToolBar || // Access the tool buttons directly. role == QAccessible::Pane || // Scroll areas. - role == QAccessible::Client) // The default for QWidget. + role == QAccessible::Client || // The default for QWidget. + role == QAccessible::PopupMenu) // Access the menu items directly return true; NSString *mac_role = macRole(interface); @@ -252,7 +256,6 @@ bool shouldBeIgnored(QAccessibleInterface *interface) NSArray *unignoredChildren(QAccessibleInterface *interface) { int numKids = interface->childCount(); - // qDebug() << "Children for: " << axid << iface << " are: " << numKids; NSMutableArray *kids = [NSMutableArray arrayWithCapacity:numKids]; for (int i = 0; i < numKids; ++i) { @@ -261,7 +264,6 @@ NSArray *unignoredChildren(QAccessibleInterface *int continue; QAccessible::Id childId = QAccessible::uniqueId(child); - //qDebug() << " kid: " << childId << child; QMacAccessibilityElement *element = [QMacAccessibilityElement elementWithId: childId]; if (element)