mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2024-12-16 18:58:45 +01:00
Re-enable A11y (IOS-194)
This commit is contained in:
parent
32520be6c9
commit
873c5befe2
@ -54,7 +54,7 @@ extension ProfileCardView.ViewModel {
|
|||||||
bindRelationship(view: view)
|
bindRelationship(view: view)
|
||||||
bindDashboard(view: view)
|
bindDashboard(view: view)
|
||||||
bindFamiliarFollowers(view: view)
|
bindFamiliarFollowers(view: view)
|
||||||
// bindAccessibility(view: view)
|
bindAccessibility(view: view)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func bindHeader(view: ProfileCardView) {
|
private func bindHeader(view: ProfileCardView) {
|
||||||
@ -177,73 +177,69 @@ extension ProfileCardView.ViewModel {
|
|||||||
view.familiarFollowersDashboardView.configure(familiarFollowers: familiarFollowers)
|
view.familiarFollowersDashboardView.configure(familiarFollowers: familiarFollowers)
|
||||||
}
|
}
|
||||||
.store(in: &disposeBag)
|
.store(in: &disposeBag)
|
||||||
// $backgroundColor
|
}
|
||||||
// .assign(to: \.backgroundColor, on: view.familiarFollowersDashboardView.viewModel)
|
private func bindAccessibility(view: ProfileCardView) {
|
||||||
// .store(in: &disposeBag)
|
let authorAccessibilityLabel = Publishers.CombineLatest(
|
||||||
|
$authorName,
|
||||||
|
$bioContent
|
||||||
|
)
|
||||||
|
.map { authorName, bioContent -> String? in
|
||||||
|
var strings: [String?] = []
|
||||||
|
strings.append(authorName?.string)
|
||||||
|
strings.append(bioContent?.string)
|
||||||
|
return strings.compactMap { $0 }.joined(separator: ", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// private func bindAccessibility(view: ProfileCardView) {
|
authorAccessibilityLabel
|
||||||
// let authorAccessibilityLabel = Publishers.CombineLatest(
|
.map { $0 ?? "" }
|
||||||
// $authorName,
|
.assign(to: &$groupedAccessibilityLabel)
|
||||||
// $bioContent
|
|
||||||
// )
|
$groupedAccessibilityLabel
|
||||||
// .map { authorName, bioContent -> String? in
|
.sink { accessibilityLabel in
|
||||||
// var strings: [String?] = []
|
view.accessibilityLabel = accessibilityLabel
|
||||||
// strings.append(authorName?.string)
|
}
|
||||||
// strings.append(bioContent?.string)
|
.store(in: &disposeBag)
|
||||||
// return strings.compactMap { $0 }.joined(separator: ", ")
|
|
||||||
// }
|
let statusesContent = $statusesCount
|
||||||
//
|
.removeDuplicates()
|
||||||
// authorAccessibilityLabel
|
.map {
|
||||||
// .map { $0 ?? "" }
|
AXCustomContent(
|
||||||
// .assign(to: &$groupedAccessibilityLabel)
|
label: L10n.Scene.Profile.Dashboard.otherPosts,
|
||||||
//
|
value: String(describing: $0)
|
||||||
// $groupedAccessibilityLabel
|
)
|
||||||
// .sink { accessibilityLabel in
|
}
|
||||||
// view.accessibilityLabel = accessibilityLabel
|
let followingContent = $followingCount
|
||||||
// }
|
.removeDuplicates()
|
||||||
// .store(in: &disposeBag)
|
.map {
|
||||||
//
|
AXCustomContent(
|
||||||
// let statusesContent = $statusesCount
|
label: L10n.Scene.Profile.Dashboard.otherFollowing,
|
||||||
// .removeDuplicates()
|
value: String(describing: $0)
|
||||||
// .map {
|
)
|
||||||
// AXCustomContent(
|
}
|
||||||
// label: L10n.Scene.Profile.Dashboard.otherPosts,
|
let followersContent = $followersCount
|
||||||
// value: "\($0.)"
|
.removeDuplicates()
|
||||||
// )
|
.map {
|
||||||
// }
|
AXCustomContent(
|
||||||
// let followingContent = $followingCount
|
label: L10n.Scene.Profile.Dashboard.otherFollowers,
|
||||||
// .removeDuplicates()
|
value: String(describing: $0)
|
||||||
// .map {
|
)
|
||||||
// AXCustomContent(
|
}
|
||||||
// label: L10n.Scene.Profile.Dashboard.otherFollowing,
|
let familiarContent = view.familiarFollowersDashboardView.viewModel.$label
|
||||||
// value: $0
|
.map { $0?.accessibilityLabel ?? ""}
|
||||||
// )
|
.removeDuplicates()
|
||||||
// }
|
.map {
|
||||||
// let followersContent = $followersCount
|
AXCustomContent(
|
||||||
// .removeDuplicates()
|
label: L10n.Scene.Profile.Dashboard.familiarFollowers,
|
||||||
// .map {
|
value: $0
|
||||||
// AXCustomContent(
|
)
|
||||||
// label: L10n.Scene.Profile.Dashboard.otherFollowers,
|
}
|
||||||
// value: $0
|
Publishers.CombineLatest4(
|
||||||
// )
|
statusesContent,
|
||||||
// }
|
followingContent,
|
||||||
// let familiarContent = view.familiarFollowersDashboardView.viewModel.$label
|
followersContent,
|
||||||
// .map { $0?.accessibilityLabel }
|
familiarContent
|
||||||
// .removeDuplicates()
|
).sink { statuses, following, followers, familiar in
|
||||||
// .map {
|
view.accessibilityCustomContent = [statuses, following, followers, familiar].compactMap { $0 }
|
||||||
// AXCustomContent(
|
}.store(in: &disposeBag)
|
||||||
// label: L10n.Scene.Profile.Dashboard.familiarFollowers,
|
}
|
||||||
// value: $0
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
// Publishers.CombineLatest4(
|
|
||||||
// statusesContent,
|
|
||||||
// followingContent,
|
|
||||||
// followersContent,
|
|
||||||
// familiarContent
|
|
||||||
// ).sink { statuses, following, followers, familiar in
|
|
||||||
// view.accessibilityCustomContent = [statuses, following, followers, familiar].compactMap { $0 }
|
|
||||||
// }.store(in: &disposeBag)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ extension FamiliarFollowersDashboardView {
|
|||||||
@Published var emojis: MastodonContent.Emojis = [:]
|
@Published var emojis: MastodonContent.Emojis = [:]
|
||||||
@Published var backgroundColor: UIColor?
|
@Published var backgroundColor: UIColor?
|
||||||
|
|
||||||
@Published var label: MetaContent?
|
@Published public var label: MetaContent?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user