Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

spec(native): the Swift Thumbnail record says the open button stands for the image, as core's (#8545)

Cindy Zhang82bb99fd4672
diff --git a/packages/native/apple/Sources/Astryx/Thumbnail/Thumbnail.spec.md b/packages/native/apple/Sources/Astryx/Thumbnail/Thumbnail.spec.md
index 689883aa9c..f4aa14c1bb 100644
--- a/packages/native/apple/Sources/Astryx/Thumbnail/Thumbnail.spec.md
+++ b/packages/native/apple/Sources/Astryx/Thumbnail/Thumbnail.spec.md
@@ -127,7 +127,10 @@ states Thumbnail's choices.
## Accessibility contract
- **AR1 — Named group.** The thumbnail is a container named by ORD2. The image
- reads as its `alt` and is hidden without one (X4).
+ reads as its `alt` and is hidden without one (X4). With `onClick` the open
+ button covers the image and its name, "Open" with the thumbnail's name,
+ stands for it, so VoiceOver does not read the image on its own, as core's
+ open button wraps the image and a button's content is presentational.
- **AR2 — Named actions.** The open button reads "Open" with the name and the
remove button "Remove" with the name, from core's message catalogs in the
person's language (X1).
@@ -165,14 +168,14 @@ Theme values read: `color.neutral`, `color.border`, `color.iconSecondary`,
## Verification map
-| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
-| -------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
-| FR1 | `ThumbnailTests.swift` size, plate, and two-theme renders | no image; default, neutral, butter; the largest text size | a wrong size or a color of its own fails | `audit:swift/Thumbnail/tile` |
-| FR2 | `ThumbnailTests.swift` loading states, skeleton color, contrast mix, and largest-text render | loading with and without `src`; Increase Contrast; the largest text size | a skeleton over an image, no upload look, a wrong skeleton color, or a tile that grows fails | `audit:swift/Thumbnail/loading` |
-| FR3, FR4 | `ThumbnailTests.swift` remove, tap, disabled, and mounted-while-inert tests and render | `always`, `hover`; disabled; loading | a hidden remove on touch or under keyboard focus, a hard-coded remove glyph, or a tap while disabled or loading fails; an open or remove button that unmounts while loading or disabled fails; a pointer that reveals the remove button on a disabled thumbnail fails | `audit:swift/Thumbnail/actions` |
-| FR5 | `TooltipPresenterTests.swift` for each input; `ThumbnailTests.swift` name and focus-within tests | enabled and disabled; blank label | a tooltip on a disabled thumbnail, or none for keyboard focus on its open or remove button, fails; that the tile keeps one structure across a disabled toggle or an upload ending is not measured, since a test cannot see a rebuild | `audit:swift/Thumbnail/tooltip` |
-| FR6 | `ThumbnailTests.swift` initializer, trailing-closure, and hidden tests; `contracts.test.ts` | both initializers; `isHidden` | differing props or a drawn hidden thumbnail fails | `audit:swift/Thumbnail/api` |
-| AR1, AR2 | `ThumbnailTests.swift` name tests; `swiftIOSStrings.test.ts` | label and alt, each alone, neither | a wrong name or a missing catalog message fails | `audit:swift/Thumbnail/a11y` |
+| Contract | Verification | Representative states | Mutation or failure expectation | Audit section |
+| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
+| FR1 | `ThumbnailTests.swift` size, plate, and two-theme renders | no image; default, neutral, butter; the largest text size | a wrong size or a color of its own fails | `audit:swift/Thumbnail/tile` |
+| FR2 | `ThumbnailTests.swift` loading states, skeleton color, contrast mix, and largest-text render | loading with and without `src`; Increase Contrast; the largest text size | a skeleton over an image, no upload look, a wrong skeleton color, or a tile that grows fails | `audit:swift/Thumbnail/loading` |
+| FR3, FR4 | `ThumbnailTests.swift` remove, tap, disabled, and mounted-while-inert tests and render | `always`, `hover`; disabled; loading | a hidden remove on touch or under keyboard focus, a hard-coded remove glyph, or a tap while disabled or loading fails; an open or remove button that unmounts while loading or disabled fails; a pointer that reveals the remove button on a disabled thumbnail fails | `audit:swift/Thumbnail/actions` |
+| FR5 | `TooltipPresenterTests.swift` for each input; `ThumbnailTests.swift` name and focus-within tests | enabled and disabled; blank label | a tooltip on a disabled thumbnail, or none for keyboard focus on its open or remove button, fails; that the tile keeps one structure across a disabled toggle or an upload ending is not measured, since a test cannot see a rebuild | `audit:swift/Thumbnail/tooltip` |
+| FR6 | `ThumbnailTests.swift` initializer, trailing-closure, and hidden tests; `contracts.test.ts` | both initializers; `isHidden` | differing props or a drawn hidden thumbnail fails | `audit:swift/Thumbnail/api` |
+| AR1, AR2 | `ThumbnailTests.swift` name and open-button tests (`hasOpenButton` decides the image's hiding); `swiftIOSStrings.test.ts`; the rendered tree is not measured | label and alt, each alone, neither; with and without `onClick` | a wrong name or a missing catalog message fails | `audit:swift/Thumbnail/a11y` |
## Decision log