You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add accessibility annotations to hotspots (#19)
* feat: add accessibility annotations to hotspots
Allow users to annotate hotspots with accessibility metadata (label,
role, hint, traits) so generated instructions include VoiceOver/TalkBack
implementation guidance. Bumps file format to v12.
- Add collapsible Accessibility section to HotspotModal with label,
role select, hint, and trait toggle pills
- Add platform-specific accessibility API mappings for SwiftUI, React
Native, Flutter, and Jetpack Compose
- Render Accessibility table in screens.md and guidance in build-guide.md
- Add accessibility field to MCP server create/update hotspot tools
- Backfill accessibility: null for older .drawd files
- Save/restore accessibility data with hotspot presets
- Add 18 new tests covering rendering, migration, and integration
* refactor: simplify accessibility code after review
- Extract shared accessibilitySchema constant in hotspot-tools.js
(was duplicated verbatim in create and update tool definitions)
- Fix stale closure bug in trait toggle onClick (use functional
updater so rapid clicks don't lose state)
- Add per-platform docsUrl to ACCESSIBILITY_PLATFORM_MAP (was
hardcoded to Apple docs URL for all platforms)
- Remove unused _platform parameter from renderAccessibilityBlock
---------
Co-authored-by: Quang Tran <16215255+trmquang93@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/pages/docs/userGuide.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,6 +145,20 @@ When a screen has text-input hotspots, a yellow `Form` button appears in the scr
145
145
> [!TIP]
146
146
> Use the Form Summary to audit your form screens before generating instructions. Missing validations are easy to overlook in individual hotspot modals.
147
147
148
+
### Accessibility annotations
149
+
150
+
Every hotspot has an optional Accessibility section. Expand it to define how screen readers should announce the element:
151
+
152
+
-**Label** -- What VoiceOver or TalkBack reads aloud (e.g. "Sign in button")
153
+
-**Role** -- The semantic role: button, link, image, heading, text, search-field, toggle, slider, tab, alert, menu, or other
154
+
-**Hint** -- A usage hint describing the result of activating the element (e.g. "Double tap to sign in")
When you generate instructions, screens with accessibility annotations include an **Accessibility** table listing each annotated element. If a specific platform is selected (SwiftUI, React Native, Flutter, Jetpack Compose), the build guide includes platform-specific implementation patterns for accessibility modifiers.
158
+
159
+
> [!TIP]
160
+
> Accessibility annotations are saved with presets, so you can reuse common patterns across hotspots.
161
+
148
162
## Connecting Screens
149
163
150
164
Connections (navigation links) show how a user moves from one screen to another. They appear as curved arrows on the canvas between screen cards.
md+=`1. Implement each screen from screens.md as a separate ${pt.name} view/component\n`;
776
783
md+=`2. For EACH screen, open its reference image from the \`images/\` folder and replicate the visual design exactly — colors, typography, spacing, layout, and component hierarchy\n`;
0 commit comments