Commit 58f29f9
refactor: Migrate Accessibility Infrastructure from Market Design System (#593)
# Migrate Accessibility Infrastructure from Market Design System
## Overview
This PR migrates accessibility infrastructure components from the market
design system into the Blueprint repository, consolidating accessibility
tooling for Blueprint consumers.
## Changes
### New Module: `BlueprintUIAccessibilityCore`
- Created new Swift package target for accessibility infrastructure
- Migrated accessibility composition and deferral patterns from market
design system
- Added localization support for 12 locales (en, es, fr, ca, ja, pt
variants)
- Included test coverage for accessibility features
### Key Components
- **AccessibilityComposition**: Combines multiple accessibility elements
into unified experiences
- **AccessibilityDeferral**: Enables content inheritance patterns for
form fields and containers
- **AccessibilitySetter**: Element wrapper for applying accessibility
properties with composition
- **Localized strings infrastructure** with extraction tooling
- **Extensions and utilities** for accessibility traits and custom
actions
### BlueprintUICommonControls Updates
- **Reorganized accessibility files** into dedicated `Accessibility/`
directory
- **Added AccessibilityCombine**: Element wrapper that uses the new
composition infrastructure
- **Added AccessibilityModifiers**: Convenience methods that leverage
the new core functionality
- **Updated existing accessibility elements** to integrate with the new
module
- **Maintained backwards compatibility** for all existing accessibility
APIs
### Dependencies Updated
- Modified `BlueprintUICommonControls` to depend on
`BlueprintUIAccessibilityCore`
- Updated `Package.swift` to include the new accessibility core target
- Enhanced build configuration with resource handling for localized
strings
### Developer Tooling
- Added string extraction script (`Scripts/extract_english_strings.sh`)
- Included comprehensive documentation in
`BlueprintUIAccessibilityCore/README.md`
- Updated project configuration for Xcode and Tuist
## Files Modified
### New Module Structure
```
BlueprintUIAccessibilityCore/
├── README.md
├── Sources/
│ ├── AccessibilityComposition.swift
│ ├── AccessibilityDeferral.swift
│ ├── AccessibilitySetter.swift
│ ├── LocalizedStrings.swift
│ └── Extensions/
│ ├── AccessibilityTraits+Extensions.swift
│ ├── Array+Extensions.swift
│ ├── Optional+Extensions.swift
│ └── UIAccessibilityCustomAction+Extensions.swift
├── Tests/
│ └── AccessibilityCompositionTests.swift
└── Resources/ (12 localization directories)
```
### BlueprintUICommonControls Changes
```
BlueprintUICommonControls/Sources/Accessibility/
├── AccessibilityBlocker.swift (moved)
├── AccessibilityContainer.swift (moved)
├── AccessibilityElement.swift (moved)
├── AccessibilityFocus.swift (moved)
├── AccessibilityLargeContentViewer.swift (moved)
├── AccessibilityCombine.swift (new)
└── AccessibilityModifiers.swift (new)
```
## Rationale
- Consolidates accessibility tooling previously distributed across
repositories
- Makes accessibility patterns available to all Blueprint consumers
- Improves maintainability through centralized infrastructure
- Enables consistent testing and documentation
## Testing
- All existing tests continue to pass
- Localization strings validated
- Module dependencies verified
## Breaking Changes
None. This change is additive and does not affect existing Blueprint
functionality.
---------
Co-authored-by: johnnewman-square <[email protected]>
Co-authored-by: Soroush Khanlou <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent a378ea7 commit 58f29f9
File tree
35 files changed
+3223
-4
lines changed- BlueprintUIAccessibilityCore
- Resources
- ca-ES.lproj
- en-AU.lproj
- en-CA.lproj
- en-GB.lproj
- en-IE.lproj
- en.lproj
- es-ES.lproj
- es.lproj
- fr-CA.lproj
- fr-FR.lproj
- ja.lproj
- pt-PT.lproj
- Sources
- Extensions
- Tests
- BlueprintUICommonControls/Sources/Accessibility
- SampleApp
- Tuist/ProjectDescriptionHelpers
35 files changed
+3223
-4
lines changedLarge diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
0 commit comments