Copy link to clipboard
Copied
Hi
We are creating Interactive PDF from InDesign with Tagged pdf option enabled for Accessibility tag. In some other place we found there is span tag which is automatically generated, There is any issue if there is span tag. Inside LBL there is span tag please let us know we need to remove it or retain as is.
Thanks
Ganesh.R
Copy link to clipboard
Copied
Hi Ganesh,
I would certainly remove them since they are problematic is several areas. One, I believe span tags are non-semantic tags which do not convey meaning of the content they are containing which can also lead to issues with several screen readers for users that have disabilities. I, for one, have been including this practice to remove any <div> or <span> tags within my documents for this reason alone since my career is to ensure that all of our electronic documents are 508 complaint and accessibile.
Copy link to clipboard
Copied
@Ganesh_In , the above answer by @AccessibilityForAll is incorrect.
I'll try to correct the misunderstanding.
I would certainly remove them since they are problematic is several areas. ...
By @AccessibilityForAll
The <Span> tag is a legal tag in the PDF/UA standard (as well as in HTML, too). It's purpose is to mark up small parts of text in the document for specific purposes. See https://www.pubcom.com/blog/2020_05-02_tags/pdf-ua-tags.shtml
If you believe that they are "problematic in several areas," please let us know what problems you encounter. Most problems are due to mis-creation of the PDF by whoever created the PDF, or mis-processing of the PDF by a technology, such as a text-to-speech program. Don't blame these problems on the file format.
One, I believe span tags are non-semantic tags which do not convey meaning of the content they are containing which can also lead to issues with several screen readers for users that have disabilities.
By @AccessibilityForAll
The <Span> tag can convey semantic meaning. Example: the Language attribute is placed on a <Span> tag when text switches from English to French. It also conveys when a software hyphen is used within body text, which can signal some assistive technologies to join the two fragments into one word. Visual formatting can also be defined with <Span> tags, which can be helpful for some users of assistive technologies.
For those in dual-language countries/provinces, such as Ontario, <Span> tags that differentiate the languages in a PDF are essential for AODA compliance.
I, for one, have been including this practice to remove any <div> or <span> tags within my documents for this reason alone since my career is to ensure that all of our electronic documents are 508
By @AccessibilityForAllcomplaintcompliant and accessibile.
<Div> tags are also legal per the PDF/UA standard (as well as HTML). They're used for programming the file and do not convey any semantics to the end user, but do assist in designating portions of the code for specific purposes (just as in HTML). Unless you know programming (and specifically PDF programming and the PDF/UA standard), I wouldn't remove them: you can cause detrimental problems to the PDF — for everyone who uses the file, not just for assistive technologies.
Summary:
<Div> — ignore them because assistive technologies should not announce them.
<Span> — are required in certain places to provide full accessibility to the content. Leave them alone unless you know exactly how and why they are in the file and are confident that they are not needed.
In most PDF files our shop reviews and remediates, <Span> tags are needlessly made by content creators when they do not know how to make an accessible source file (like Word or Adobe InDesign). Any manual formatting in the source file will be programmed into the PDF with a <Span> tag.
In MS Word, the top control panel is incorrectly used to visually format the .DOCX file, and can cause useless <Span> tags in the PDF. Solution: learn to use Word correctly.
These tools in Word cause <Span> tags in the PDF.
Similarly in Adobe InDesign, manual formatting via its control and properties panels causes useless <Span> tags in the PDF. Each line of text within the paragraph <P> is wrapped in a <Span>. Solution: learn to use InDesign correctly.
In InDesign, manual formatting created <Span> tags for every line of text.
Bottom line:
—Bevi Chagnon
US Delegate to the ISO committees for PDF and PDF/UA
Copy link to clipboard
Copied
Hello, I’m experiencing the same problem when using justified text and line breaks, which causes sentence splits.
I need sentence separation for layout purposes, but in continuous text, these sentence breaks keep appearing, and InDesign unnecessarily inserts spans at those points. This disrupts the reading flow when using a screen reader to skip through the text.
Is there a workaround for this?
thank you for your answers.
Copy link to clipboard
Copied
Hi @bennetj5781989,
Thanks for reaching out!
You’re absolutely right — when exporting from Adobe InDesign to tagged PDF, especially with justified text and manual line breaks, the application may insert <Span> tags at those breakpoints. This behavior is typically done to preserve formatting and alignment, but it can interfere with screen reader navigation and reading continuity.
InDesign creates <Span> tags at line breaks to maintain visual layout fidelity.
These spans can fragment what should be a continuous sentence, leading screen readers to pause unnaturally or misinterpret flow.
It’s more noticeable with justified text, where layout adjustments are more frequent.
Avoid Manual Line Breaks Where Possible:
Instead of using Shift+Enter (soft return), let InDesign handle text flow automatically.
Manual breaks often signal InDesign to start a new span.
Use Paragraph Spacing Instead of Line Breaks for Layout:
Adjust leading, spacing before/after paragraphs, or set baseline grids, rather than breaking lines mid-sentence.
Simplify Structure in Export Settings:
When exporting to tagged PDF, under Export Adobe PDF (Interactive) > Accessibility, try unchecking “Use structure for tab order” if it’s unnecessary, and experiment with structure simplification.
Post-Export Tag Cleanup (Advanced):
Use Adobe Acrobat Pro’s Tags panel to flatten or merge spans that are interrupting flow.
Or use a tool like Callas PDF Toolbox to script the clean-up of unnecessary <Span> tags.
Screen Reader Optimization:
If you’re targeting screen reader usability, consider using left alignment instead of full justification. It reduces span fragmentation and improves natural reading order.
Here’s a reference to best practices on tagged PDF export from InDesign:
Wait for more input from the experts.
~Tariq
Copy link to clipboard
Copied
Hi @Ganesh_In, if you're creating PDFs from InDesign, get more detailed training in how to do it.
InDesign is a tough program to learn and it generally is incorrectly formatted with manual overrides.
Some "laws" we teach in our InDesign classes:
Use InDesign's Style Highlighter to locate where manual formatting was done.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now