iOS: Add accessibility labels to toolbar buttons
This commit is contained in:
parent
89b226e321
commit
4f3e1432e7
@ -30,6 +30,7 @@ struct ToolBar: View {
|
||||
Image(systemName: "arrow.left")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.accessibility(label: Text("Back"))
|
||||
.contextMenu {
|
||||
ForEach(Array(navigator.backStack.suffix(5).enumerated()), id: \.1) { (index, url) in
|
||||
Button {
|
||||
@ -47,6 +48,7 @@ struct ToolBar: View {
|
||||
Image(systemName: "arrow.right")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.accessibility(label: Text("Forward"))
|
||||
.contextMenu {
|
||||
ForEach(navigator.forwardStack.prefix(5).enumerated().reversed(), id: \.1) { (index, url) in
|
||||
Button {
|
||||
@ -64,6 +66,7 @@ struct ToolBar: View {
|
||||
Image(systemName: "arrow.clockwise")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.accessibility(label: Text("Reload"))
|
||||
|
||||
Spacer()
|
||||
|
||||
@ -71,6 +74,7 @@ struct ToolBar: View {
|
||||
Image(systemName: "square.and.arrow.up")
|
||||
.font(.system(size: 24))
|
||||
}
|
||||
.accessibility(label: Text("Share"))
|
||||
|
||||
Spacer()
|
||||
|
||||
@ -80,6 +84,7 @@ struct ToolBar: View {
|
||||
Image(systemName: "gear")
|
||||
.font(.system(size: 24))
|
||||
})
|
||||
.accessibility(label: Text("Preferences"))
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
Loading…
x
Reference in New Issue
Block a user