Fixing Accessibility Issues in Word-to-PDF Conversion (Power Automate + OpenXML)

Generating PDFs in enterprise applications is often treated as a straightforward task until accessibility requirements come into play.

In my previous implementation of an end-to-end PDF generation pipeline using Power Pages, Power Automate, and Azure Functions, one of the biggest challenges was ensuring that the final PDF output was accessible and compliant with WCAG standards.

This article focuses specifically on the accessibility challenges encountered during Word-to-PDF conversion and how they were addressed using OpenXML and post-processing techniques.

The Problem

Using Power Automate’s standard approach:

  • Populate Word Template
  • Convert Word Document to PDF

…produces visually correct documents, but accessibility is often compromised.

Common Issues Observed

  • Lists rendered as plain paragraphs instead of structured lists
  • Checkboxes appearing as static symbols with no semantic meaning
  • Screen readers failing to interpret grouped content correctly
  • Loss of tagging and logical reading order in the final PDF

For users relying on assistive technologies, these issues make the document difficult—or even impossible—to navigate.

Why This Happens

Power Automate’s document generation process focuses primarily on visual rendering, not semantic structure.

Key Limitations

  • Word templates populated via Power Automate do not always preserve semantic elements
  • The built-in PDF conversion process does not guarantee proper tagging
  • Complex controls (like repeating sections) are flattened into static content
  • Accessibility metadata is either lost or never created

In short:
👉 The output looks right, but it isn’t structured correctly.

The Approach

To solve this, I introduced a post-processing step using an Azure Function.

Updated Flow

  1. Power Automate generates the Word document
  2. The document is sent to an Azure Function
  3. OpenXML is used to modify the document structure
  4. The updated document is converted to PDF using a library that supports accessibility
  5. The final PDF is returned to the client

This approach shifts control from “template-only” to full document manipulation.

Key Fixes Implemented

1. Converting Plain Text to Structured Lists

Problem
Bullet points generated via templates were interpreted as plain text by screen readers.

Solution
Using OpenXML:

  • Identify sections representing lists
  • Replace text-based bullets with proper list elements
  • Ensure correct numbering or bullet hierarchy

Result
Screen readers can now:

  • Recognize lists
  • Navigate between items
  • Announce the structure properly

2. Improving Checkbox Representation

Problem
Checkboxes were rendered as symbols (e.g., ☑ or ☐), with no semantic meaning.

Solution

  • Detect checkbox placeholders in the document
  • Replace them with structured representations
  • Ensure consistent labelling and context

Result
Users relying on assistive technologies can understand:

  • Whether an option is selected
  • What the option represents

3. Restoring Document Structure

Problem
Sections like grouped answers or repeated data lost their logical hierarchy.

Solution

  • Reorganize document elements using OpenXML
  • Apply consistent heading and grouping patterns
  • Maintain a logical reading order

Result

  • Improved navigation for screen readers
  • Better alignment with accessibility standards

4. Ensuring Proper PDF Conversion

Problem
Even with a well-structured Word document, conversion tools can break accessibility.

Solution

  • Use a PDF conversion library that supports accessible output
  • Ensure tagging and structure are preserved during conversion

Result

  • Final PDF retains semantic structure
  • Compatible with screen readers and accessibility tools

Key Lessons Learned

1. Accessibility Is Not Automatic

Even if your source document looks structured, it doesn’t mean accessibility is preserved.

You must explicitly:

  • Define structure
  • Validate output
  • Test with assistive tools

2. Word Templates Have Limits

They are useful for:

  • Layout
  • Simple data binding

But not for:

  • Complex structure
  • Accessibility-critical elements

3. Post-Processing Is Essential

OpenXML provides the flexibility needed to:

  • Modify document structure
  • Enforce consistency
  • Apply accessibility rules programmatically

4. Testing Is Critical

Accessibility should be validated using:

  • Screen readers
  • Keyboard navigation
  • Accessibility checkers

Relying only on visual inspection is not enough.

When to Use This Approach

This method is especially useful when:

  • Accessibility compliance is required (e.g., WCAG)
  • Documents contain structured content (lists, forms, checkboxes)
  • Output must be consumed by a wide range of users
  • Standard Power Automate capabilities are insufficient

Final Thoughts

Accessibility is often treated as an afterthought in document generation—but it shouldn’t be.

By introducing a post-processing step with OpenXML and using the right PDF conversion tools, it’s possible to transform a basic document pipeline into an accessible, enterprise-grade solution.

If you’re working with Power Automate and generating documents for real users, investing in accessibility early will save significant effort and deliver a much better experience.

Share