-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Labels: accessibility, enhancement, user-experience, high-priority
Current Situation
Our current color scheme may present challenges for users with color vision deficiencies:
- Relies heavily on color alone to convey meaning
- Uses red/green combinations which are problematic for many color-blind users
- Lacks alternative visual indicators for distinguishing statement types
- No way to customize or override color choices
Impact
According to color blindness statistics:
- Affects approximately 8% of males and 0.5% of females
- Red-green color blindness is most common
- Blue-yellow color blindness affects about 0.01% of population
- Complete color blindness (monochromacy) is rare but exists
Primary Proposed Solution: Shape + Color System
Approach
Implement a combined shape-and-color system where each statement type has:
- A distinctive prefix symbol
- Color-blind friendly colors
- Optional bold/italic formatting
# Example output format:
■ [PROGRAM] Main execution started # Square prefix + Blue
▶ [TASK] Processing data # Triangle prefix + Cyan
● [STEP] Loading file # Circle prefix + Yellow
⬥ [VARIABLE] count = 5 # Diamond prefix + White
▢ [SUBTASK] Calculate average # Hollow square + Light blue
⬡ [LOOP] Starting iteration # Hollow hexagon + Purple
Color Palette
Use a carefully selected colorblind-friendly palette:
COLORBLIND_SAFE_COLORS = {
'PROGRAM': '\033[38;5;75m', # Blue
'TASK': '\033[38;5;80m', # Light cyan
'STEP': '\033[38;5;220m', # Yellow
'VARIABLE': '\033[38;5;255m', # White
'SUBTASK': '\033[38;5;117m', # Light blue
'LOOP': '\033[38;5;147m', # Light purple
'DECISION': '\033[38;5;180m', # Light brown
'OUTPUT': '\033[38;5;145m', # Light gray
}
SYMBOLS = {
'PROGRAM': '■', # Filled square
'TASK': '▶', # Triangle
'STEP': '●', # Circle
'VARIABLE': '⬥', # Diamond
'SUBTASK': '▢', # Hollow square
'LOOP': '⬡', # Hollow hexagon
'DECISION': '◆', # Filled diamond
'OUTPUT': '▹', # Small triangle
}
Implementation Details
- Add new configuration option:
--accessibility-mode
- Create AccessibilityFormatter class to handle different formatting needs
- Allow customization of symbols through config file
- Add high contrast mode option
Why This Approach Works
-
Multiple Distinguishing Features:
- Shape provides primary identification
- Color provides secondary reinforcement
- Position remains consistent
- Optional text styling adds third identifier
-
Testing Methodology:
- Can be validated with color blindness simulators
- Works even in grayscale
- Symbols remain clear at different terminal sizes
-
Flexibility:
- Users can customize symbols
- Colors can be adjusted
- Works with screen readers (symbols have text equivalents)
Alternative Approaches
1. Indentation-Based System
PROGRAM: Main execution
TASK: Processing data
STEP: Loading file
VARIABLE: count = 5
SUBTASK: Calculate average
LOOP: Starting iteration
Pros:
- No reliance on color or symbols
- Clear hierarchy
- Works in plain text
Cons:
- Takes more vertical space
- Harder to scan quickly
- Less visually appealing
2. Pattern-Based System
### PROGRAM ### Main execution started
=== TASK === Processing data
--- STEP --- Loading file
*** VARIABLE *** count = 5
+++ SUBTASK +++ Calculate average
~~~ LOOP ~~~ Starting iteration
Pros:
- Distinctive without color
- Works in any terminal
- Easy to implement
Cons:
- More visual noise
- Takes horizontal space
- Less professional looking
3. Number-Based System
[1] PROGRAM: Main execution started
[1.1] TASK: Processing data
[1.1.1] STEP: Loading file
[1.1.1.1] VARIABLE: count = 5
[1.1.2] SUBTASK: Calculate average
[1.1.2.1] LOOP: Starting iteration
Pros:
- Clear hierarchy
- Works without color
- Good for documentation
Cons:
- Complex for deeply nested structures
- Numbers can be distracting
- Takes extra space
Next Steps
- Create prototype with shape+color system
- Test with color blindness simulators
- Get feedback from users with color vision deficiencies
- Implement configuration system
- Add documentation and examples
- Create automated tests for accessibility
Technical Requirements
- Unicode support for symbols
- Terminal compatibility testing
- Screen reader testing
- Configuration file format
- Color contrast validation
Questions
- Should we provide multiple accessibility modes for different needs?
- How can we make the configuration system user-friendly?
- Should we add sound cues for certain events?
- How can we maintain backward compatibility?
Resources
- Color Oracle for testing
- WCAG Guidelines
- Colorblind Web Page Filter
Please share thoughts on the proposed approaches and any additional considerations for accessibility.