Repository navigation
fix(ios): keep wall-end aiming visible at accessibility text sizes #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SamGu-NRX
wants to merge
5
commits into
fix/past-end-recovery-20261003
Choose a base branch
from
fix/end-aim-visibility-20261004
base: fix/past-end-recovery-20261003
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+540
−49
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
21ac61e
ios: at the largest text sizes, the wall-end card folds so the circle…
SamGu-NRX 254a456
ios: folded end cards keep coaching off the circle, and the moved rep…
SamGu-NRX b1dc252
ios: folded end cards lead with the remedy for darkness, and with the…
SamGu-NRX 55449e3
ios: the past-end circle is in the view only while offered, so VoiceO…
SamGu-NRX 6a5b240
ios: the coached fold tests look for the note's words, not the lead's
SamGu-NRX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import SwiftUI | ||
|
|
||
| extension View { | ||
| /// The circle a mark lands under (`Reticle`), as one accessibility element: "Aiming circle". | ||
| /// The reticle itself is hidden from VoiceOver as decoration. Here it says where "Wall ends | ||
| /// here" and the other marks land, and UI tests read its real frame to check that nothing | ||
| /// covers it (`PastEndRecoveryUITests`, `WalkRecoveryUITests`). Apply it before the reticle | ||
| /// is stretched to the screen, so the element's frame is the circle's. Show the circle only | ||
| /// while it is offered: `.accessibilityHidden` on this element left it in the tree at zero | ||
| /// opacity (CI run 37171342665), so VoiceOver would stop on a circle that isn't there. | ||
| func endAimCircle() -> some View { | ||
| accessibilityElement(children: .ignore) | ||
| .accessibilityLabel("Aiming circle") | ||
| .accessibilityIdentifier("aim.circle") | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| import SwiftUI | ||
|
|
||
| /// A card's reply ("I can't get there", "The wall keeps going") shown among the actions instead, | ||
| /// while the card folds around the circle at the largest text sizes (`GapRequestScreen`, | ||
| /// `WallWalkScreen`). It keeps the card reply's input lock: after its task changes it takes no | ||
| /// taps for `InstructionCard.replyLock`, so a tap meant for the step that just left can't answer | ||
| /// this one (#82). Coaching or a refusal within the same task keeps it unlocked, as on the card. | ||
| /// The secondary style doesn't read `isEnabled`, so the lock doesn't change how it looks; | ||
| /// VoiceOver and UI tests read it as dimmed. | ||
| struct MovedReplyButton: View { | ||
| let title: String | ||
| let hint: String | ||
| let identifier: String | ||
| /// The step the reply answers; a new one locks the button again. | ||
| let task: Instruction | ||
| let perform: () -> Void | ||
|
|
||
| @State private var unlockedTask: Instruction? | ||
|
|
||
| var body: some View { | ||
| Button(action: perform) { | ||
| Text(title) | ||
| .frame(maxWidth: .infinity) | ||
| } | ||
| .buttonStyle(.secondary) | ||
| .disabled(unlockedTask != task) | ||
| .accessibilityHint(hint) | ||
| .accessibilityIdentifier(identifier) | ||
| .task(id: task) { | ||
| // Cleared first, so a task that comes back within the lock is locked again. | ||
| let shown = task | ||
| unlockedTask = nil | ||
| do { try await Task.sleep(for: InstructionCard.replyLock) } catch { return } | ||
| unlockedTask = shown | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.