feat(plugins): implement Sprint 4 commands (#241-#258)
Sprint 4 - Plugin Commands implementation adding 18 new user-facing commands across 8 plugins as part of V5.2.0 Plugin Enhancements. **projman:** - #241: /sprint-diagram - Mermaid visualization of sprint issues **pr-review:** - #242: Confidence threshold config (PR_REVIEW_CONFIDENCE_THRESHOLD) - #243: /pr-diff - Formatted diff with inline review comments **data-platform:** - #244: /data-quality - DataFrame quality checks (nulls, duplicates, outliers) - #245: /lineage-viz - dbt lineage as Mermaid diagrams - #246: /dbt-test - Formatted dbt test runner **viz-platform:** - #247: /chart-export - Export charts to PNG/SVG/PDF via kaleido - #248: /accessibility-check - Color blind validation (WCAG contrast) - #249: /breakpoints - Responsive layout configuration **contract-validator:** - #250: /dependency-graph - Plugin dependency visualization **doc-guardian:** - #251: /changelog-gen - Generate changelog from conventional commits - #252: /doc-coverage - Documentation coverage metrics - #253: /stale-docs - Flag outdated documentation **claude-config-maintainer:** - #254: /config-diff - Track CLAUDE.md changes over time - #255: /config-lint - 31 lint rules for CLAUDE.md best practices **cmdb-assistant:** - #256: /cmdb-topology - Infrastructure topology diagrams - #257: /change-audit - NetBox audit trail queries - #258: /ip-conflicts - Detect IP conflicts and overlaps Closes #241, #242, #243, #244, #245, #246, #247, #248, #249, #250, #251, #252, #253, #254, #255, #256, #257, #258 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
144
plugins/viz-platform/commands/accessibility-check.md
Normal file
144
plugins/viz-platform/commands/accessibility-check.md
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
description: Validate color accessibility for color blind users
|
||||
---
|
||||
|
||||
# Accessibility Check
|
||||
|
||||
Validate theme or chart colors for color blind accessibility, checking contrast ratios and suggesting alternatives.
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/accessibility-check {target}
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- `target` (optional): "theme" or "chart" - defaults to active theme
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
/accessibility-check
|
||||
/accessibility-check theme
|
||||
/accessibility-check chart
|
||||
```
|
||||
|
||||
## Tool Mapping
|
||||
|
||||
This command uses the `accessibility_validate_colors` MCP tool:
|
||||
|
||||
```python
|
||||
accessibility_validate_colors(
|
||||
colors=["#228be6", "#40c057", "#fa5252"], # Colors to check
|
||||
check_types=["deuteranopia", "protanopia", "tritanopia"],
|
||||
min_contrast_ratio=4.5 # WCAG AA standard
|
||||
)
|
||||
```
|
||||
|
||||
Or validate a full theme:
|
||||
```python
|
||||
accessibility_validate_theme(
|
||||
theme_name="corporate"
|
||||
)
|
||||
```
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **User invokes**: `/accessibility-check theme`
|
||||
2. **Tool analyzes**: Theme color palette
|
||||
3. **Tool simulates**: Color perception for each deficiency type
|
||||
4. **Tool checks**: Contrast ratios between color pairs
|
||||
5. **Tool returns**: Issues found and alternative suggestions
|
||||
|
||||
## Color Blindness Types
|
||||
|
||||
| Type | Affected Colors | Population |
|
||||
|------|-----------------|------------|
|
||||
| **Deuteranopia** | Red-Green (green-blind) | ~6% males, 0.4% females |
|
||||
| **Protanopia** | Red-Green (red-blind) | ~2.5% males, 0.05% females |
|
||||
| **Tritanopia** | Blue-Yellow | ~0.01% total |
|
||||
|
||||
## Output Example
|
||||
|
||||
```json
|
||||
{
|
||||
"theme_name": "corporate",
|
||||
"overall_score": "B",
|
||||
"issues": [
|
||||
{
|
||||
"type": "contrast",
|
||||
"severity": "warning",
|
||||
"colors": ["#fa5252", "#40c057"],
|
||||
"affected_by": ["deuteranopia", "protanopia"],
|
||||
"message": "Red and green may be indistinguishable for red-green color blind users",
|
||||
"suggestion": "Use blue (#228be6) instead of green to differentiate from red"
|
||||
},
|
||||
{
|
||||
"type": "contrast_ratio",
|
||||
"severity": "error",
|
||||
"colors": ["#fab005", "#ffffff"],
|
||||
"ratio": 2.1,
|
||||
"required": 4.5,
|
||||
"message": "Insufficient contrast for WCAG AA compliance",
|
||||
"suggestion": "Darken yellow to #e6a200 for ratio of 4.5+"
|
||||
}
|
||||
],
|
||||
"recommendations": [
|
||||
"Add patterns or shapes to distinguish data series, not just color",
|
||||
"Include labels directly on chart elements",
|
||||
"Consider using a color-blind safe palette"
|
||||
],
|
||||
"safe_palettes": {
|
||||
"categorical": ["#4477AA", "#EE6677", "#228833", "#CCBB44", "#66CCEE", "#AA3377", "#BBBBBB"],
|
||||
"sequential": ["#FEE0D2", "#FC9272", "#DE2D26"],
|
||||
"diverging": ["#4575B4", "#FFFFBF", "#D73027"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## WCAG Contrast Standards
|
||||
|
||||
| Level | Ratio | Use Case |
|
||||
|-------|-------|----------|
|
||||
| AA (normal text) | 4.5:1 | Body text, labels |
|
||||
| AA (large text) | 3:1 | Headings, 14pt+ bold |
|
||||
| AAA (enhanced) | 7:1 | Highest accessibility |
|
||||
|
||||
## Color-Blind Safe Palettes
|
||||
|
||||
The tool can suggest complete color-blind safe palettes:
|
||||
|
||||
### IBM Design Colors
|
||||
Designed for accessibility:
|
||||
```
|
||||
#648FFF #785EF0 #DC267F #FE6100 #FFB000
|
||||
```
|
||||
|
||||
### Tableau Colorblind 10
|
||||
Industry-standard accessible palette:
|
||||
```
|
||||
#006BA4 #FF800E #ABABAB #595959 #5F9ED1
|
||||
#C85200 #898989 #A2C8EC #FFBC79 #CFCFCF
|
||||
```
|
||||
|
||||
### Okabe-Ito
|
||||
Optimized for all types of color blindness:
|
||||
```
|
||||
#E69F00 #56B4E9 #009E73 #F0E442 #0072B2
|
||||
#D55E00 #CC79A7 #000000
|
||||
```
|
||||
|
||||
## Related Commands
|
||||
|
||||
- `/theme-new {name}` - Create accessible theme from the start
|
||||
- `/theme-validate {name}` - General theme validation
|
||||
- `/chart {type}` - Create chart (check colors after)
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Don't rely on color alone** - Use shapes, patterns, or labels
|
||||
2. **Test with simulation** - View your visualizations through color blindness simulators
|
||||
3. **Use sufficient contrast** - Minimum 4.5:1 for text, 3:1 for large elements
|
||||
4. **Limit color count** - Fewer colors = easier to distinguish
|
||||
5. **Use semantic colors** - Blue for information, red for errors (with icons)
|
||||
Reference in New Issue
Block a user