Tags
Span/Custom
Span tags are used to group or contain inline text elements that don’t have semantic meaning on their own. They can be useful for styling or minor adjustments, such as correcting spaces or ensuring proper reading flow without affecting the logical structure of the document. Custom tags are used to mark content that doesn’t fit into standard PDF/UA tagging categories or when a document contains unique elements requiring specific labels.
Both tags help ensure content is accessible and readable by assistive technologies, with span tags focusing on text refinement and custom tags providing structure for non-standard elements. Proper use of these tags enhances the document’s logical flow and usability for all users.
Span tags are particularly useful for handling cases where the visual layout or formatting could confuse the reading flow. Below are some situations and examples on the use of Span tags:
1. Handling Hyphenated Words
Example:
If a word is split across two lines with a dash (e.g., "international" is visually broken as ""inter- \n national"), a span tag can combine the parts, ensuring the screen reader reads it seamlessly as "international".
2. Correcting Missing Spaces in Text
Sometimes, during document creation, formatting issues can result in missing spaces between words or phrases, which can confuse screen readers and disrupt the reading flow. Span tags can be used to address these small but critical issues without altering the document's appearance.
Example:
A document contains the sentence:
"Accessibilityisessential for inclusivity."
Visually, it might appear correct due to tight kerning, but a screen reader would read it as "Accessibilityisessential," merging the words. By applying a span tag to separate "Accessibility" and "isessential," the issue is corrected for assistive technologies, ensuring the sentence is read as "Accessibility is essential for inclusivity."
This use of span tags refines the document for accurate reading while maintaining its visual presentation.
3. Correcting Text Flow
Example:
When a paragraph includes a decorative initial letter (e.g., a large, stylized "T" at the start of "The quick brown fox"), a span tag can mark the initial letter as separate from the main text to ensure it doesn’t disrupt the reading order or pronunciation by the screen reader.
4. Indicating a Different Language in a Multilingual Document
Example:
An English document includes the following sentence:
"The French motto Liberté, Égalité, Fraternité embodies the principles of the French Republic."
Without proper tagging, a screen reader might mispronounce "Liberté, Égalité, Fraternité" using English phonetics. By applying a span tag to identify the French phrase, the screen reader switches to French pronunciation, ensuring the phrase is read correctly and maintains its cultural and linguistic integrity.
5. Providing Clarifications for Abbreviations
Example:
When an abbreviation like "AI" appears, a span tag can include alternate text to clarify that it stands for "Artificial Intelligence" when read by the screen reader.
6. Retaining Proper Reading Order for Inline Elements
Example:
If superscript or subscript text (e.g., "H₂O" or "E=mc²") is used, span tags can help maintain the correct reading order, ensuring the screen reader reads the text as "H two O" or "E equals mc squared" without misinterpreting formatting as a break in content.
7. Enhancing Pronunciation in Technical Terms
Example:
In documents containing technical jargon, like "NaCl" (sodium chloride), a span tag with alternate text can provide proper pronunciation or explanation, ensuring clarity for the reader.
- Use span tags sparingly and only when they serve a clear purpose, such as maintaining proper reading flow or visual presentation.
- Avoid overusing custom tags; aim to map them to standard tags or provide clear alternate text or properties to explain their function.
Role Mapping in Adobe Acrobat ensures that custom tags in a PDF are correctly associated with standard accessibility roles recognized by assistive technologies like screen readers. This process helps maintain consistency between the document structure and how content is interpreted by accessibility tools.
How to Use Role Mapping in Acrobat Pro:
- Open the Tags Panel
- Go to View > Show/Hide > Navigation Panes > Tags.
- Open the Role Mapping Dialog
- Click the Options menu (≡) in the Tags panel.
- Select Edit Role Map.
- Check Custom Tags
- Look for any tags that do not match standard PDF/UA roles (e.g., <custom>).
- Map Custom Tags to Standard Tags
- Select the custom tag.
- Choose an appropriate standard tag from the dropdown list (e.g., <Span>
<H1>, <P>, <Table>). - Click OK to apply the mapping.
- Verify the Role Mapping
- Use screen readers (NVDA, JAWS) or accessibility checkers (Acrobat Accessibility Checker, PAC 2024) to test the structure.