...
In general, the PDF format is known as a "destination" file format, meaning there isn't a good way to interact with the compiled code that generates a PDF directly. There do exist many libraries that leverage XML to create PDFs, but these libraries compile to the The PDF format which is considered mostly to be "machine-readable" only and isn't easy to edit directly.
Thankfully, there is other software like Adobe Acrobat Pro that enables us to improve the general accessibility of PDFs. This workflow could be considered "repairing" the PDF, but ultimately the generally accepted advice generally is to focus on the "source" document instead. For example if the PDF in question is created in software like Microsoft Word or Adobe InDesign, it is preferred to add the accessibility fixes in question to those source documents files instead, since further revisions would benefit from those accessibility improvements.[1]
...
Go to tools
Add the Accessibility Tools Shortcut to your tool bar
Click the Accessibility Tab on the right
Select “Accessibility Check”
Now, on the left of the document, you should see a tree with what the parser thinks the document structure is and any issues it may have caught
...
The tasks and properties tabs lay out issues that affect the whole document whereas issue details break the document down into page-by-page issues. Complete all fields in these areas and download the document and you should have an accessible PDF.
Fixing Google Slides Exports
One issue that we’ve faced is a Google Slides presentation exporting without tags and corrupting when tags are added. Should this issue arise again, you can remediate the issue by exporting as a Powerpoint .pptx
file, and then exporting as a PDF from Powerpoint. The web version is suitable for this.