Skip to content

Warn when voiceover_snapshots lists a strategy that cannot run - #201

Open
AllDmeat wants to merge 5 commits into
BarredEwe:mainfrom
AllDmeat:feature/voiceover-text-only
Open

AllDmeat wants to merge 5 commits into
BarredEwe:mainfrom
AllDmeat:feature/voiceover-text-only

Conversation

@AllDmeat

@AllDmeat AllDmeat commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Short description

voiceover_snapshots used to skip a listed strategy silently where it cannot run, so [text] on tvOS recorded no text and said nothing. Now the generated file gives a compile warning. What tests record does not change.

The docs now also say plainly that image means the accessibility PNG, not the regular snapshot, and that this setting does not affect the preview PNG.

Before

voiceover_snapshots Platform Compile warning
[text] macOS, tvOS none
[image] macOS, or no AccessibilitySnapshot none
[image, text] macOS, tvOS none
[image, text] iOS without AccessibilitySnapshot none

After

voiceover_snapshots Platform Compile warning
[text] macOS, tvOS text
[image] macOS, or no AccessibilitySnapshot image
[image, text] macOS, tvOS text, image
[image, text] iOS without AccessibilitySnapshot image

Targets without the key get no new warning, since they did not ask for anything.

Compatibility

No reference changes. A target that builds with warnings as errors and lists a strategy it cannot run will stop compiling until it removes that strategy from the list.

The template is embedded in the CLI, and publish.yml rebuilds Binaries/ and bumps the version, so this PR does neither.

Validation

On Xcode 27.1:

  • make test: 159 tests, zero failures. The strategy test covers both warnings and checks that the preview PNG comparison is generated for every value.
  • make test-ios: 55 tests, zero failures, with the generated [text] test comparing both text and PNG references.
  • The generated [text] file compiles on macOS in a separate package and shows the text warning.

Not run: a tvOS build, and the Example baseline suite. The image warning is checked as generated text, not seen in a build.

🤖 Generated with Claude Code

AllDmeat and others added 3 commits November 4, 2026 17:05
The generated tests now record what the list names. A list with text and
without image skips the preview PNG, and a strategy the platform cannot do
gives a compile warning instead of being skipped silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The setting covers accessibility snapshots only, so it must not change the
preview PNG. What remains of this branch is the compile warning for a listed
strategy that cannot run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AllDmeat AllDmeat changed the title Record only the text with voiceover_snapshots: [text], no PNG Warn when voiceover_snapshots lists a strategy that cannot run Nov 4, 2026
AllDmeat and others added 2 commits November 4, 2026 19:07
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant