mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Keep hidden QuickLook chrome out of VoiceOver focus order
The media upload preview hides the QLPreviewController's navigation bar and toolbar share button visually, but their buttons stayed in VoiceOver's focus order. Mark the chrome as accessibility-hidden so it is no longer focusable. Addresses #5266, #5267.
This commit is contained in:
@@ -316,6 +316,11 @@ private class PreviewViewController: QLPreviewController {
|
||||
|
||||
// Hide toolbar share button
|
||||
toolbarItems?.first?.isHidden = true
|
||||
|
||||
// The chrome is hidden visually but its buttons remain in VoiceOver's focus order,
|
||||
// so keep the navigation bar and toolbar out of the accessibility tree too.
|
||||
navigationController?.navigationBar.accessibilityElementsHidden = true
|
||||
navigationController?.toolbar?.accessibilityElementsHidden = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user