mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 16:57:00 +01:00
feat(android,ios): read each library tile once, with its long press as an action
A poster's artwork carried the title's name and so did the text under it, so a screen reader said the name twice. The artwork is now left out where the text names it, and a folded franchise tile says how many more it stands for. The long press that opens a tile's menu is offered as an action, labelled on Android and as More on iOS, where tapAndHold also makes the whole tile one button. On iOS the app behind a full-screen player is hidden from VoiceOver, which walked the library behind the picture.
This commit is contained in:
1 parent
01eee78317
commit
bf3fa19c70
4 files changed
+26
-5
No files matched your search
@@ -115,6 +115,14 @@ private struct TapAndHold: ViewModifier {
|
||||
.animation(.easeOut(duration: 0.1), value: pressed)
|
||||
.onTapGesture(perform: onTap)
|
||||
.onLongPressGesture(perform: { onHold?() }, onPressingChanged: { pressed = $0 })
|
||||
// One element to VoiceOver, a button, with the long press as an
|
||||
// action: a gesture is not something it can perform.
|
||||
.accessibilityElement(children: .combine)
|
||||
.accessibilityAddTraits(.isButton)
|
||||
.accessibilityAction(.default, onTap)
|
||||
.accessibilityActions {
|
||||
if let onHold { Button("More", action: onHold) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user