Appearance
Spec: Accessibility
Overview
Make DigitalWorks fully accessible to users with disabilities, including screen reader support, keyboard-only navigation, high contrast modes, and reduced motion preferences. Target WCAG 2.1 AA compliance for all interactive elements.
Motivation
- Educational institutions must provide accessible tools (legal requirement in many regions).
- Students with visual impairments, motor disabilities, or cognitive differences deserve equal access.
- Accessibility improvements (keyboard navigation, clear focus indicators) benefit all users.
- Microsoft Store and enterprise deployment often require accessibility compliance.
Requirements
Functional Requirements
Screen Reader Support
- UI Automation: All interactive elements expose UIA (UI Automation) properties.
- Component Announcements: Screen reader announces component type, name, pin states.
- Canvas Navigation: Navigate between components using arrow keys with screen reader feedback.
- Wire Announcements: Describe wire connections (e.g., "Wire from AND1 output to OR2 input A").
- Simulation State: Announce signal state changes on focused elements.
- Live Regions: Simulation status and errors announced automatically.
Keyboard Navigation
- Full Keyboard Access: Every operation achievable without mouse.
- Tab Order: Logical tab order through toolbox, canvas, panels, menus.
- Canvas Keyboard Navigation: Arrow keys move between components; Enter to select/interact.
- Wire Drawing via Keyboard: Mode to draw wires by selecting source pin → destination pin.
- Component Placement: Keyboard-based placement with grid navigation.
- Focus Indicators: Visible focus ring on all interactive elements (high contrast).
- Shortcut Keys: Comprehensive keyboard shortcuts for all common operations.
Visual Accessibility
- High Contrast Mode: Full support for Windows high contrast themes.
- Color Independence: No information conveyed by color alone (add shapes/patterns/labels).
- Configurable Colors: User-customizable wire, component, and signal colors.
- Text Sizing: UI respects system text size settings (large text mode).
- Minimum Contrast: All text and UI elements meet 4.5:1 contrast ratio (AA).
- Wire State Indicators: Signal state shown by pattern/shape, not just color (e.g., dashed = low, solid = high).
Motor Accessibility
- Large Click Targets: Minimum 44×44px touch/click targets for all interactive elements.
- Sticky Keys Support: Single-key shortcuts work with system sticky keys.
- Dwell Click: Compatible with eye-tracking and dwell-click assistive tech.
- Reduced Precision: Generous snap-to-pin tolerances for users with limited fine motor control.
Cognitive Accessibility
- Reduced Motion: Respect
prefers-reduced-motion; disable animations. - Clear Labeling: All buttons and controls have descriptive labels (no icon-only without tooltip).
- Consistent Layout: Predictable, consistent UI layout across all views.
- Error Guidance: Clear, actionable error messages (not just codes).
Non-Functional Requirements
- Pass Microsoft Accessibility Insights automated audit.
- Screen reader testing with NVDA and Narrator.
- Keyboard testing: complete a full circuit design workflow without mouse.
- WCAG 2.1 AA compliance for all non-canvas UI elements.
- Canvas accessibility is best-effort (graphical by nature) with keyboard navigation alternative.
Design
UIA Tree for Canvas
The canvas presents a flat graphical view, but for accessibility, expose a logical tree:
Canvas (role: diagram)
├── Component: AND1 (role: group)
│ ├── Pin: Input A - High (role: status)
│ ├── Pin: Input B - Low (role: status)
│ └── Pin: Output - Low (role: status)
├── Component: OR1 (role: group)
│ ├── Pin: Input A - Low (role: status)
│ └── Pin: Output - Low (role: status)
├── Wire: AND1.Out → OR1.InA (role: connector)
└── Annotation: "Half Adder" (role: text)Keyboard Navigation Model
Tab → enters canvas
Arrow keys → move focus between components (spatial navigation)
Enter → select component (or toggle interactive input)
Space → start wire from focused pin
Escape → cancel current operation
F2 → rename/edit properties
Delete → delete focused element
Ctrl+Arrow → move selected componentHigh Contrast Integration
csharp
// Detect high contrast mode
var settings = new UISettings();
bool isHighContrast = AccessibilitySettings.HighContrast;
// Use system high contrast colors
var foreground = isHighContrast ? SystemColors.WindowText : normalForeground;
var background = isHighContrast ? SystemColors.Window : normalBackground;
// Wire states in high contrast: use patterns instead of colors
WireStyle highSignal = isHighContrast ? WireStyle.SolidThick : WireStyle.Green;
WireStyle lowSignal = isHighContrast ? WireStyle.Dashed : WireStyle.Gray;Screen Reader Announcements
csharp
// When focus moves to a component
AutomationProperties.SetName(element, "AND Gate, 2 inputs, Output: High");
AutomationProperties.SetHelpText(element, "Press Enter to select, F2 to edit properties");
// Live region for simulation updates
AutomationProperties.SetLiveSetting(statusBar, AutomationLiveSetting.Polite);Implementation Tasks
- Audit all UI controls for UIA properties (Name, Role, State).
- Implement canvas keyboard navigation (spatial arrow-key movement).
- Implement keyboard-based wire drawing (pin-to-pin selection mode).
- Add UIA automation peers for canvas elements (components, wires).
- Implement high contrast mode rendering (patterns, system colors).
- Ensure all color-conveyed information has non-color alternative.
- Add visible focus indicators to all interactive elements.
- Implement live region announcements for simulation state.
- Add
prefers-reduced-motionsupport (disable animations). - Verify minimum contrast ratios across all themes.
- Test with Narrator and NVDA screen readers.
- Test complete workflows with keyboard-only input.
- Run Microsoft Accessibility Insights automated checks.
Risks & Open Questions
- How detailed should screen reader descriptions of complex circuits be (too verbose vs. too sparse)?
- Should there be an audio mode that plays tones for signal states?
- Canvas is inherently visual — how much can be made accessible vs. providing alternative views (text-based circuit description)?
- Performance impact of maintaining UIA tree for large circuits (1000+ elements)?
Priority
Low-Medium — Required for educational institution compliance; improves quality for all users.