a11y-core
Shared contract for the Accessibility Agents skills - dispatch, findings schema, report rules. Read by skills, never dispatched on its own.
Reference data, not a reviewer. Remediate Office documents (Word/Excel/PowerPoint) for accessibility. Generates Python scripts via python-docx, openpyxl, python-pptx API references.
$ npx -y skills add Community-Access/accessibility-agents --skill kb-office-remediation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/kb-office-remediationContext preview
The summary Claude sees to decide when to auto-load this skill.
Reference data, not a reviewer. Remediate Office documents (Word/Excel/PowerPoint) for accessibility. Generates Python scripts via python-docx, openpyxl, python-pptx API references.
name: kb-office-remediation description: Reference data, not a reviewer. Remediate Office documents (Word/Excel/PowerPoint) for accessibility. Generates Python scripts via python-docx, openpyxl, python-pptx API references. license: MIT disable-model-invocation: true user-invocable: false metadata: tier: reference domain: cross-cutting output: none effort: low title: Office Remediation
API reference and code patterns for programmatically fixing accessibility issues in Microsoft Office documents.
---
from docx import Document
doc = Document("input.docx")
doc.core_properties.title = "Descriptive Title"
doc.save("output.docx")from docx import Document
from docx.oxml.ns import qn
from lxml import etree
doc = Document("input.docx")
styles_element = doc.styles.element
rPrDefault = styles_element.find(qn("w:docDefaults/w:rPrDefault/w:rPr"))
if rPrDefault is not None:
lang = rPrDefault.find(qn("w:lang"))
if lang is None:
lang = etree.SubElement(rPrDefault, qn("w:lang"))
lang.set(qn("w:val"), "en-US")
doc.save("output.docx")from docx import Document
from docx.oxml.ns import qn
from lxml import etree
doc = Document("input.docx")
for table in doc.tables:
first_row = table.rows[0]._tr
trPr = first_row.get_or_add_trPr()
existing = trPr.find(qn("w:tblHeader"))
if existing is None:
header_elem = etree.SubElement(trPr, qn("w:tblHeader"))
header_elem.set(qn("w:val"), "true")
doc.save("output.docx")from docx import Document
from docx.oxml.ns import qn
doc = Document("input.docx")
for rel in doc.part.rels.values():
if "image" in rel.reltype:
# Images are referenced via <wp:docPr> in the document XML
# Alt text is the 'descr' attribute on the docPr element
pass
# Direct XML approach for inline images:
body = doc.element.body
for docPr in body.iter(qn("wp:docPr")):
if not docPr.get("descr"):
docPr.set("descr", "TODO: Add alt text")
doc.save("output.docx")from docx import Document
HEADING_MAP = {
"Heading 3": "Heading 2", # Example: fix skipped level
}
doc = Document("input.docx")
for para in doc.paragraphs:
if para.style.name in HEADING_MAP:
para.style = doc.styles[HEADING_MAP[para.style.name]]
doc.save("output.docx")---
from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
wb.properties.title = "Descriptive Title"
wb.properties.creator = "Author Name"
wb.save("output.xlsx")from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
for ws in wb.worksheets:
if ws.max_row > 1:
ws.print_title_rows = "1:1" # Repeat row 1 on every printed page
wb.save("output.xlsx")GENERIC = {"Sheet", "Sheet1", "Sheet2", "Sheet3", "Tabelle1", "Feuil1"}
from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
for ws in wb.worksheets:
if ws.title in GENERIC:
print(f"Generic sheet name: '{ws.title}' — rename to describe content")from openpyxl import load_workbook
wb = load_workbook("input.xlsx")
for ws in wb.worksheets:
if ws.merged_cells.ranges:
for merged in ws.merged_cells.ranges:
print(f"Sheet '{ws.title}': merged range {merged}")---
from pptx import Presentation
prs = Presentation("input.pptx")
prs.core_properties.title = "Descriptive Title"
prs.save("output.pptx")from pptx import Presentation
prs = Presentation("input.pptx")
for i, slide in enumerate(prs.slides, 1):
title_shape = slide.shapes.title
if title_shape is None:
print(f"Slide {i}: No title placeholder")
elif not title_shape.text.strip():
print(f"Slide {i}: Empty title")from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE_TYPE
prs = Presentation("input.pptx")
for i, slide in enumerate(prs.slides, 1):
for shape in slide.shapes:
if shape.shape_type == MSO_SHAPE_TYPE.PICTURE:
if not getattr(shape, "_element").get("descr", ""):
# Access via XML for older python-pptx versions
shape._element.set("descr", "TODO: Add alt text")
prs.save("output.pptx")from pptx import Presentation
from lxml import etree
prs = Presentation("input.pptx")
for i, slide in enumerate(prs.slides, 1):
shapes = [(s.left, s.top, s.name) for s in slide.shapes]
# Visual order (top-to-bottom, left-to-right) vs. XML order
visual = sorted(shapes, key=lambda s: (s[1], s[0]))
xml_order = [s.name for s in slide.shapes]
visual_order = [s[2] for s in visual]
if xml_order != visual_order:
print(f"Slide {i}: Reading order may differ from visual layout")---
$word = New-Object -ComObject Word.Application
$word.Visible = $false
$doc = $word.Documents.Open("C:\path\document.docx")
$doc.BuiltinDocumentProperties("Title").Value = "Accessible Title"
$doc.Save()
$doc.Close()
$word.Quit()
[System.Runtime.InteropServices.Marshal]::ReleaseComObject($word) | Out-Null$excel = New-Object -ComObject Excel.Application
$excel.Visible = $false
$wb = $excel.Workbooks.Open("C:\path\spreadsheet.xlsx")
$wb.BuiltinDocumentProperties("Title").Value = "Accessible Title"
# Rename sheets (example)
# $wb.Sheets.Item(1WCAG 2.2 AA enforcement for agentic coding, as a set of Agent Skills. One package, read natively by Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity, with no per-client copies. Models forget accessibility while generating code.
Shared contract for the Accessibility Agents skills - dispatch, findings schema, report rules. Read by skills, never dispatched on its own.
Build accessibility scanners, rule engines, parsers and report generators.
Web UI accessibility lead. Use before writing or changing HTML, JSX, TSX, Vue, Svelte, CSS or templates. Picks specialists and merges their findings.
Compare audits across commits to find new, fixed and regressed issues.
Generate a W3C or EU model accessibility statement from audit results.
GitHub Actions: workflow runs, logs, re-runs and CI failure triage.