Fix read filter accessibility labels (help)
This commit is contained in:
parent
6c236fc0e3
commit
2ebec7801c
|
@ -30,7 +30,7 @@ struct SidebarToolbarModifier: ViewModifier {
|
|||
} else {
|
||||
AppAssets.filterInactiveImage.font(.title3)
|
||||
}
|
||||
}).help("Filter Read Feeds")
|
||||
}).help(sidebarModel.isReadFiltered ? "Show Read Feeds" : "Filter Read Feeds")
|
||||
}
|
||||
|
||||
ToolbarItem(placement: .automatic) {
|
||||
|
|
|
@ -35,6 +35,7 @@ struct SidebarView: View {
|
|||
})
|
||||
.padding(.top, 8).padding(.trailing)
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.help(sidebarModel.isReadFiltered ? "Show Read Feeds" : "Filter Read Feeds")
|
||||
}
|
||||
ZStack {
|
||||
NavigationLink(destination: TimelineContainerView(feeds: sidebarModel.selectedFeeds), isActive: $navigate) {
|
||||
|
|
|
@ -10,16 +10,24 @@ import SwiftUI
|
|||
|
||||
struct TimelineToolbarModifier: ViewModifier {
|
||||
|
||||
@EnvironmentObject private var timelineModel: TimelineModel
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
content
|
||||
.toolbar {
|
||||
#if os(iOS)
|
||||
ToolbarItem(placement: .navigation) {
|
||||
Button (action: {
|
||||
withAnimation {
|
||||
timelineModel.isReadFiltered.toggle()
|
||||
}
|
||||
}, label: {
|
||||
AppAssets.filterInactiveImage
|
||||
.font(.title3)
|
||||
}).help("Filter Read Articles")
|
||||
if timelineModel.isReadFiltered {
|
||||
AppAssets.filterActiveImage.font(.title3)
|
||||
} else {
|
||||
AppAssets.filterInactiveImage.font(.title3)
|
||||
}
|
||||
}).help(timelineModel.isReadFiltered ? "Show Read Articles" : "Filter Read Articles")
|
||||
}
|
||||
|
||||
ToolbarItem {
|
||||
|
|
|
@ -31,6 +31,7 @@ struct TimelineView: View {
|
|||
})
|
||||
.padding(.top, 8).padding(.trailing)
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
.help(timelineModel.isReadFiltered ? "Show Read Articles" : "Filter Read Articles")
|
||||
}
|
||||
ZStack {
|
||||
NavigationLink(destination: ArticleContainerView(articles: timelineModel.selectedArticles), isActive: $navigate) {
|
||||
|
|
Loading…
Reference in New Issue