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")
|
Image(systemName: "arrow.left")
|
||||||
.font(.system(size: 24))
|
.font(.system(size: 24))
|
||||||
}
|
}
|
||||||
|
.accessibility(label: Text("Back"))
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
ForEach(Array(navigator.backStack.suffix(5).enumerated()), id: \.1) { (index, url) in
|
ForEach(Array(navigator.backStack.suffix(5).enumerated()), id: \.1) { (index, url) in
|
||||||
Button {
|
Button {
|
||||||
|
@ -47,6 +48,7 @@ struct ToolBar: View {
|
||||||
Image(systemName: "arrow.right")
|
Image(systemName: "arrow.right")
|
||||||
.font(.system(size: 24))
|
.font(.system(size: 24))
|
||||||
}
|
}
|
||||||
|
.accessibility(label: Text("Forward"))
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
ForEach(navigator.forwardStack.prefix(5).enumerated().reversed(), id: \.1) { (index, url) in
|
ForEach(navigator.forwardStack.prefix(5).enumerated().reversed(), id: \.1) { (index, url) in
|
||||||
Button {
|
Button {
|
||||||
|
@ -64,6 +66,7 @@ struct ToolBar: View {
|
||||||
Image(systemName: "arrow.clockwise")
|
Image(systemName: "arrow.clockwise")
|
||||||
.font(.system(size: 24))
|
.font(.system(size: 24))
|
||||||
}
|
}
|
||||||
|
.accessibility(label: Text("Reload"))
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
@ -71,6 +74,7 @@ struct ToolBar: View {
|
||||||
Image(systemName: "square.and.arrow.up")
|
Image(systemName: "square.and.arrow.up")
|
||||||
.font(.system(size: 24))
|
.font(.system(size: 24))
|
||||||
}
|
}
|
||||||
|
.accessibility(label: Text("Share"))
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
|
@ -80,6 +84,7 @@ struct ToolBar: View {
|
||||||
Image(systemName: "gear")
|
Image(systemName: "gear")
|
||||||
.font(.system(size: 24))
|
.font(.system(size: 24))
|
||||||
})
|
})
|
||||||
|
.accessibility(label: Text("Preferences"))
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
Loading…
Reference in New Issue