docs-accessibility
Documentation accessibility validation and remediation. Check WCAG 2.1 compliance, validate alt text, analyze heading hierarchy, verify color contrast, and generate accessibility reports.
What this skill does
# Documentation Accessibility Skill
Documentation accessibility validation and remediation.
## Capabilities
- WCAG 2.1 compliance checking
- Image alt text validation
- Heading hierarchy analysis
- Color contrast verification
- Screen reader compatibility testing
- Keyboard navigation validation
- ARIA landmark checking
- Accessibility report generation
## Usage
Invoke this skill when you need to:
- Audit documentation for accessibility
- Validate image alt text
- Check heading structure
- Verify color contrast ratios
- Generate accessibility reports
## Inputs
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| inputPath | string | Yes | Path to documentation or built site |
| action | string | Yes | audit, validate-images, check-headings |
| standard | string | No | WCAG level (A, AA, AAA) |
| outputFormat | string | No | json, html, sarif |
| fix | boolean | No | Auto-fix issues where possible |
### Input Example
```json
{
"inputPath": "./docs/_build/html",
"action": "audit",
"standard": "AA",
"outputFormat": "json"
}
```
## Output Structure
### Accessibility Report
```json
{
"summary": {
"total": 156,
"passed": 142,
"failed": 14,
"level": "AA",
"score": 91
},
"byCategory": {
"images": { "passed": 45, "failed": 3 },
"headings": { "passed": 28, "failed": 2 },
"contrast": { "passed": 52, "failed": 5 },
"navigation": { "passed": 17, "failed": 4 }
},
"issues": [
{
"id": "img-alt-missing",
"wcag": "1.1.1",
"level": "A",
"impact": "critical",
"description": "Image missing alt text",
"location": {
"file": "docs/guide/setup.md",
"line": 42,
"element": "<img src=\"diagram.png\">"
},
"suggestion": "Add descriptive alt text: alt=\"System architecture diagram showing...\""
},
{
"id": "heading-skip",
"wcag": "1.3.1",
"level": "A",
"impact": "moderate",
"description": "Heading levels should only increase by one",
"location": {
"file": "docs/api/users.md",
"line": 15,
"element": "<h4>User Properties</h4>"
},
"context": "H2 -> H4 (skipped H3)",
"suggestion": "Change to <h3> or add missing <h3> above"
},
{
"id": "color-contrast",
"wcag": "1.4.3",
"level": "AA",
"impact": "serious",
"description": "Text does not meet contrast ratio requirements",
"location": {
"file": "docs/_static/custom.css",
"line": 28,
"element": ".note { color: #999; }"
},
"details": {
"foreground": "#999999",
"background": "#ffffff",
"ratio": "2.85:1",
"required": "4.5:1"
},
"suggestion": "Change to #767676 or darker for 4.5:1 ratio"
}
],
"wcagCompliance": {
"A": { "passed": 48, "failed": 6 },
"AA": { "passed": 35, "failed": 8 },
"AAA": { "passed": 12, "failed": 0 }
}
}
```
## WCAG Guidelines Checked
### Perceivable (Principle 1)
```yaml
1.1.1 - Non-text Content:
- Images have alt text
- Decorative images have empty alt
- Complex images have long descriptions
- Icons have accessible names
1.3.1 - Info and Relationships:
- Headings properly structured
- Lists properly marked up
- Tables have headers
- Form labels associated
1.4.1 - Use of Color:
- Color not sole indicator
- Links distinguishable
1.4.3 - Contrast (Minimum):
- Text: 4.5:1 ratio
- Large text: 3:1 ratio
- UI components: 3:1 ratio
```
### Operable (Principle 2)
```yaml
2.1.1 - Keyboard:
- All functionality keyboard accessible
- No keyboard traps
- Skip links present
2.4.1 - Bypass Blocks:
- Skip navigation link
- Landmark regions
2.4.2 - Page Titled:
- Descriptive page titles
2.4.6 - Headings and Labels:
- Descriptive headings
- Clear labels
2.4.7 - Focus Visible:
- Visible focus indicators
```
### Understandable (Principle 3)
```yaml
3.1.1 - Language of Page:
- lang attribute present
3.2.3 - Consistent Navigation:
- Navigation consistent across pages
3.3.2 - Labels or Instructions:
- Form inputs have labels
```
## Image Alt Text Validation
### Alt Text Rules
```javascript
const altTextRules = {
// Must have alt attribute
required: {
test: (img) => img.hasAttribute('alt'),
message: 'Image must have alt attribute'
},
// Alt text should be descriptive
descriptive: {
test: (img) => {
const alt = img.getAttribute('alt');
const badPatterns = [
/^image$/i,
/^photo$/i,
/^picture$/i,
/^graphic$/i,
/\.(?:png|jpg|gif|svg)$/i,
/^untitled/i
];
return !badPatterns.some(p => p.test(alt));
},
message: 'Alt text should describe the image content'
},
// Not too long
length: {
test: (img) => {
const alt = img.getAttribute('alt');
return alt.length <= 125;
},
message: 'Alt text should be concise (under 125 characters)'
},
// Decorative images should have empty alt
decorative: {
test: (img) => {
if (img.hasAttribute('role') && img.getAttribute('role') === 'presentation') {
return img.getAttribute('alt') === '';
}
return true;
},
message: 'Decorative images should have empty alt=""'
}
};
```
### Alt Text Suggestions
```javascript
function suggestAltText(imagePath, context) {
const suggestions = [];
// Based on filename
const filename = path.basename(imagePath, path.extname(imagePath));
if (filename.includes('diagram')) {
suggestions.push(`Diagram showing ${extractContext(context)}`);
}
if (filename.includes('screenshot')) {
suggestions.push(`Screenshot of ${extractContext(context)}`);
}
if (filename.includes('logo')) {
suggestions.push(`${extractBrand(filename)} logo`);
}
// Based on surrounding text
const heading = findNearestHeading(context);
if (heading) {
suggestions.push(`Illustration for ${heading}`);
}
return suggestions;
}
```
## Heading Structure Analysis
### Heading Hierarchy Check
```javascript
function analyzeHeadings(content) {
const headings = extractHeadings(content);
const issues = [];
let lastLevel = 0;
headings.forEach((heading, index) => {
const level = heading.level;
// Check for skipped levels
if (level > lastLevel + 1 && lastLevel !== 0) {
issues.push({
type: 'heading-skip',
heading: heading.text,
line: heading.line,
expected: lastLevel + 1,
actual: level
});
}
// Check for multiple H1s
if (level === 1 && index > 0) {
issues.push({
type: 'multiple-h1',
heading: heading.text,
line: heading.line
});
}
lastLevel = level;
});
return {
structure: buildHeadingTree(headings),
issues
};
}
```
## Color Contrast Checking
### Contrast Ratio Calculation
```javascript
function getContrastRatio(foreground, background) {
const fgLuminance = getRelativeLuminance(foreground);
const bgLuminance = getRelativeLuminance(background);
const lighter = Math.max(fgLuminance, bgLuminance);
const darker = Math.min(fgLuminance, bgLuminance);
return (lighter + 0.05) / (darker + 0.05);
}
function meetsContrastRequirement(ratio, isLargeText, level = 'AA') {
const requirements = {
'AA': { normal: 4.5, large: 3 },
'AAA': { normal: 7, large: 4.5 }
};
const threshold = isLargeText
? requirements[level].large
: requirements[level].normal;
return ratio >= threshold;
}
```
### CSS Analysis
```javascript
async function analyzeStylesheet(cssPath) {
const css = await fs.readFile(cssPath, 'utf8');
const ast = postcss.parse(css);
const issues = [];
ast.walkDecls('color', (decl) => {
const rule = decl.parent;
const bgColor = findBackgroundColor(rule) || '#ffffff';
const fgColor = decl.value;
const ratio = getContrastRatio(fgColor, bgColor);
if (!meetsRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.