Improve VoiceOver tap target frames

This commit is contained in:
Angelo Stavrow 2021-01-11 11:58:59 -05:00
parent 18173d6470
commit c4bfb195fd
No known key found for this signature in database
GPG Key ID: 1A49C7064E060EEE

View File

@ -82,6 +82,8 @@ struct PostListView: View {
model.isPresentingSettingsView = true model.isPresentingSettingsView = true
}, label: { }, label: {
Image(systemName: "gear") Image(systemName: "gear")
.padding(.vertical, 4)
.padding(.horizontal, 8)
}) })
.accessibilityLabel(Text("Settings")) .accessibilityLabel(Text("Settings"))
.accessibilityHint(Text("Open the Settings sheet")) .accessibilityHint(Text("Open the Settings sheet"))
@ -91,6 +93,8 @@ struct PostListView: View {
Spacer() Spacer()
if model.isProcessingRequest { if model.isProcessingRequest {
ProgressView() ProgressView()
.padding(.vertical, 4)
.padding(.horizontal, 8)
} else { } else {
Button(action: { Button(action: {
DispatchQueue.main.async { DispatchQueue.main.async {
@ -99,13 +103,16 @@ struct PostListView: View {
} }
}, label: { }, label: {
Image(systemName: "arrow.clockwise") Image(systemName: "arrow.clockwise")
.padding(.vertical, 4)
.padding(.horizontal, 8)
}) })
.accessibilityLabel(Text("Refresh Posts")) .accessibilityLabel(Text("Refresh Posts"))
.accessibilityHint(Text("Fetch changes from the server")) .accessibilityHint(Text("Fetch changes from the server"))
.disabled(!model.account.isLoggedIn) .disabled(!model.account.isLoggedIn)
} }
} }
.padding() .padding(.top, 8)
.padding(.horizontal, 8)
Spacer() Spacer()
} }
.frame(height: frameHeight) .frame(height: frameHeight)