Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Classes/GTXAccessibilityTree.m
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,20 @@ - (BOOL)gtx_isAccessibilityHiddenElement:(id)element {
CGRect frame = [element frame];
isHiddenDueToFrame = frame.size.width == 0 || frame.size.height == 0;
}

if (@available(iOS 26, *)) {
if ([element respondsToSelector:@selector(accessibilityTraits)]) {
if ([NSStringFromClass([element class]) isEqualToString:@"_UIButtonBarButton"]) {
UIAccessibilityTraits traits = ((UIView*)element).accessibilityTraits;
// Unclear what trait 0x8000000 is, but with liquid glass on iOS26
// this element appears to want to be ignored.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please expand on what you mean by wants to be ignored, sorry I am reading this as element is not focusable by voice over?

if (traits & 0x8000000) {
isHidden = YES;
}
}
}
}

return (isHidden || isAccessibilityHidden ||
(isHiddenDueToFrame && isHiddenDueToAccessibilityFrame) ||
[self gtx_isElementOffscreenPickerViewElement:element]);
Expand Down