Agent skill
Office Remediation Patterns
Office document OOXML manipulation patterns for accessibility remediation. Covers python-docx, openpyxl, python-pptx API references, PowerShell COM automation snippets, and direct OOXML XML manipulation for fixing accessibility issues in Word, Excel, and PowerPoint files.
Install this agent skill to your Project
npx add-skill https://github.com/Community-Access/accessibility-agents/tree/main/.gemini/extensions/a11y-agents/skills/office-remediation
SKILL.md
Office Remediation Patterns
API reference and code patterns for programmatically fixing accessibility issues in Microsoft Office documents.
python-docx Patterns (Word .docx)
| Operation | Code |
|---|---|
| Set document title | doc.core_properties.title = "Title" |
| Set document language | Set <w:lang w:val="en-US"/> on <w:rPr> via lxml |
| Fix table headers | row.cells[0]._tc → set <w:tblHeader/> on first row <w:trPr> |
| Add alt text to images | Set descr attribute on <wp:docPr> via lxml |
| Fix heading levels | Reassign paragraph.style to correct Heading N |
| Set list structure | Apply List Bullet / List Number styles |
openpyxl Patterns (Excel .xlsx)
| Operation | Code |
|---|---|
| Set workbook title | wb.properties.title = "Title" |
| Set print titles | ws.print_title_rows = '1:1' for header row repeat |
| Rename generic sheets | ws.title = "Descriptive Name" |
| Detect merged cells | ws.merged_cells.ranges — flag width > 1 |
python-pptx Patterns (PowerPoint .pptx)
| Operation | Code |
|---|---|
| Set presentation title | prs.core_properties.title = "Title" |
| Add slide titles | Add PP_PLACEHOLDER.TITLE placeholder with text |
| Add alt text to shapes | shape._element.set(qn('p:nvSpPr/p:cNvPr'), ...) → set descr |
| Fix reading order | Reorder <p:spTree> children by visual position |
| Add table headers | Set first row cells as header via <a:tblPr firstRow="1"> |
PowerShell COM Automation
# Word
$word = New-Object -ComObject Word.Application
$doc = $word.Documents.Open("C:\path\file.docx")
$doc.BuiltInDocumentProperties("Title").Value = "Title"
$doc.Save(); $doc.Close(); $word.Quit()
# Excel
$excel = New-Object -ComObject Excel.Application
$wb = $excel.Workbooks.Open("C:\path\file.xlsx")
$wb.BuiltInDocumentProperties("Title").Value = "Title"
$wb.Save(); $wb.Close(); $excel.Quit()
# PowerPoint
$ppt = New-Object -ComObject PowerPoint.Application
$prs = $ppt.Presentations.Open("C:\path\file.pptx")
$prs.BuiltInDocumentProperties("Title").Value = "Title"
$prs.Save(); $prs.Close(); $ppt.Quit()
Key OOXML Paths
| Format | ZIP Path | XML Element |
|---|---|---|
| DOCX | docProps/core.xml |
<dc:title> |
| DOCX | word/document.xml |
<w:lang>, <w:tblHeader/> |
| XLSX | docProps/core.xml |
<dc:title> |
| XLSX | xl/workbook.xml |
<sheet name=""> |
| PPTX | docProps/core.xml |
<dc:title> |
| PPTX | ppt/slides/slideN.xml |
<p:spTree> ordering |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
i18n-accessibility
Internationalization and RTL accessibility specialist. Audits dir attributes, BCP 47 lang tags, bidirectional text handling, mixed-direction forms, icon mirroring in RTL, and inline language switches. Ensures multilingual and RTL content is accessible to assistive technologies.
testing-coach
Accessibility testing coach for web applications. Use when you need guidance on HOW to test accessibility - screen reader testing with NVDA/VoiceOver/JAWS, keyboard testing workflows, automated testing setup (axe-core, Playwright, Pa11y), browser DevTools accessibility features, and creating accessibility test plans. Does not write product code - teaches and guides testing practices.
pdf-scan-config
Internal helper agent. Invoked by orchestrator agents via Task tool. PDF accessibility scan configuration manager. Use to create, edit, validate, or explain .a11y-pdf-config.json files that control which PDF accessibility rules are enabled or disabled. Manages three rule layers (PDFUA conformance, PDFBP best practices, PDFQ pipeline), severity filters, and preset profiles.
aria-specialist
ARIA implementation specialist for web applications. Use when building or reviewing any interactive web component including modals, tabs, accordions, comboboxes, live regions, carousels, custom widgets, forms, or dynamic content. Also use when reviewing ARIA usage for correctness. Applies to any web framework or vanilla HTML/CSS/JS.
Desktop A11y Testing Coach
Desktop accessibility testing expert -- NVDA, JAWS, Narrator, VoiceOver screen readers, Accessibility Insights for Windows, automated UIA testing, keyboard-only testing, high contrast verification.
lighthouse-bridge
Internal helper agent. Invoked by orchestrator agents via Task tool. Internal helper that bridges Lighthouse CI accessibility audit data with the agent ecosystem. Parses Lighthouse reports, normalizes accessibility findings, tracks score regressions, and deduplicates against local scans.
Didn't find tool you were looking for?