Skip to content

feat: add accessibility annotations to hotspots#19

Merged
trmquang93 merged 2 commits intomainfrom
feat/accessibility-annotations
Apr 2, 2026
Merged

feat: add accessibility annotations to hotspots#19
trmquang93 merged 2 commits intomainfrom
feat/accessibility-annotations

Conversation

@trmquang93
Copy link
Copy Markdown
Collaborator

Summary

  • Add accessibility: { label, role, hint, traits[] } field to hotspot data model (file format v12)
  • Add collapsible purple "Accessibility" section to HotspotModal with label input, role select, hint input, and trait toggle pills
  • Add platform-specific accessibility API mappings (SwiftUI, React Native, Flutter, Jetpack Compose) and render accessibility table in generated screens.md + guidance in build-guide.md
  • Add accessibility field to MCP server create_hotspot and update_hotspot tool schemas
  • Backfill accessibility: null for older .drawd files, save/restore with presets

Test plan

  • npm test -- 310 tests pass (18 new: 2 importFlow, 12 instructionRenderers, 4 generateInstructionFiles)
  • npm run build -- lint + production build passes
  • Open dev server, create hotspot, expand Accessibility section, fill label/role/hint/traits, save, reopen -- data persists
  • Generate instructions from flow with accessibility-annotated hotspots -- verify #### Accessibility table in screens.md and ### Accessibility guidance in build-guide.md (for platform-specific builds)
  • Open a v11 .drawd file -- hotspots get accessibility: null backfill, no errors

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
- 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
@trmquang93 trmquang93 merged commit 8ebcf17 into main Apr 2, 2026
1 check passed
@github-actions github-actions bot deleted the feat/accessibility-annotations branch April 2, 2026 07:35
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