iOS: Always insert created a11y elements to the cache
By having all known a11y elements in the cache, the iOS Screen Reader will stay up-to-date with the UI elements that are currently present. Do ensure this behavior, the ctor is made private. Fixes: QTBUG-126622 Pick-to: 6.7 Change-Id: I23452ffd60128889a49e5844a6fc17d45683cee5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> (cherry picked from commit 9a6c32bed15ed3aa13ff82e15ac6834d6e7bdc3b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
916ce646b7
commit
2bc0647805
@ -13,7 +13,6 @@
|
|||||||
|
|
||||||
@property (readonly) QAccessible::Id axid;
|
@property (readonly) QAccessible::Id axid;
|
||||||
|
|
||||||
- (instancetype)initWithId:(QAccessible::Id)anId withAccessibilityContainer:(id)view;
|
|
||||||
+ (instancetype)elementWithId:(QAccessible::Id)anId;
|
+ (instancetype)elementWithId:(QAccessible::Id)anId;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@ -13,9 +13,8 @@
|
|||||||
if (!iface || iface->state().invisible || (iface->text(QAccessible::Name).isEmpty() && iface->text(QAccessible::Value).isEmpty() && iface->text(QAccessible::Description).isEmpty()))
|
if (!iface || iface->state().invisible || (iface->text(QAccessible::Name).isEmpty() && iface->text(QAccessible::Value).isEmpty() && iface->text(QAccessible::Description).isEmpty()))
|
||||||
return;
|
return;
|
||||||
QAccessible::Id accessibleId = QAccessible::uniqueId(iface);
|
QAccessible::Id accessibleId = QAccessible::uniqueId(iface);
|
||||||
UIAccessibilityElement *elem = [[QT_MANGLE_NAMESPACE(QMacAccessibilityElement) alloc] initWithId:accessibleId withAccessibilityContainer:self];
|
UIAccessibilityElement *elem = [QT_MANGLE_NAMESPACE(QMacAccessibilityElement) elementWithId:accessibleId];
|
||||||
[m_accessibleElements addObject:elem];
|
[m_accessibleElements addObject:elem];
|
||||||
[elem release];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)createAccessibleContainer:(QAccessibleInterface *)iface
|
- (void)createAccessibleContainer:(QAccessibleInterface *)iface
|
||||||
|
Loading…
x
Reference in New Issue
Block a user