fix: pick sever search bar accessible a11y issue
This commit is contained in:
parent
41e1b75c62
commit
7772783555
|
@ -73,7 +73,6 @@
|
|||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
enableAddressSanitizer = "YES"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
@ -90,13 +89,6 @@
|
|||
ReferencedContainer = "container:Mastodon.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
<AdditionalOption
|
||||
key = "NSZombieEnabled"
|
||||
value = "YES"
|
||||
isEnabled = "YES">
|
||||
</AdditionalOption>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
|
|
|
@ -185,12 +185,12 @@ extension PickServerServerSectionTableHeaderView {
|
|||
|
||||
override func accessibilityElementCount() -> Int {
|
||||
guard let diffableDataSource = diffableDataSource else { return 0 }
|
||||
return diffableDataSource.snapshot().itemIdentifiers.count
|
||||
return diffableDataSource.snapshot().itemIdentifiers.count + 1
|
||||
}
|
||||
|
||||
override func accessibilityElement(at index: Int) -> Any? {
|
||||
guard let item = collectionView.cellForItem(at: IndexPath(item: index, section: 0)) else { return nil }
|
||||
return item
|
||||
if let item = collectionView.cellForItem(at: IndexPath(item: index, section: 0)) { return item }
|
||||
return searchTextField
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,6 +51,11 @@ extension NewsTableViewCell {
|
|||
separatorLine.bottomAnchor.constraint(equalTo: contentView.bottomAnchor),
|
||||
separatorLine.heightAnchor.constraint(equalToConstant: UIView.separatorLineHeight(of: contentView)),
|
||||
])
|
||||
|
||||
isAccessibilityElement = true
|
||||
accessibilityElements = [
|
||||
newsView
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue