How is conditional text managed in DITA to provide alternative content for users with disabilities?

In DITA, conditional text plays a critical role in managing alternative content for users with disabilities. This feature allows content creators to produce inclusive documentation by defining conditions like “alt-text,” “simplified,” and “screen-reader” and applying them to various elements or sections within DITA topics. When generating documentation, these conditions enable the inclusion of alternative content for accessibility purposes, ensuring that individuals with varying abilities can access and understand the documentation effectively.

Conditional text in DITA serves as a mechanism to manage alternative content, specifically for users with disabilities. Its primary purpose is to enhance the accessibility of content, ensuring it can be effectively understood by a broader audience, including those with diverse needs.

The process involves the following steps:

  1. Defining Conditions: Content creators begin by defining conditions that act as labels for different versions or variations of content. These conditions are named to reflect their purpose, such as “alt-text” for alternative image descriptions, “simplified” for simplified text, or “screen-reader” for content optimized for screen reader users.
  2. Tagging Content: These defined conditions are then applied to elements or sections of DITA topics. For example, images may be tagged with “alt-text” conditions to provide alternative descriptions. Complex technical terms might receive “simplified” conditions, and lengthy descriptions can be marked with “screen-reader” conditions.
  3. Generating Output: During the process of generating documentation, content creators may specify which conditions to include. For standard users, certain conditions may be excluded. However, for users with disabilities or specific accessibility requirements, these conditions are included in the output.


A DITA topic includes an image with a detailed description, which may not be suitable for all users. The management of this content is achieved through conditional text.

          <title>Using the New Device</title>
            <p>This is the new device:</p>
            <image href="new-device.jpg">
              <text>If the image is not visible, access a detailed description <alt-text>here</alt-text>.</text>
              <alt>Image of the new device</alt>
              <alt-text>Image: [link to a detailed image description]</alt-text>
            <p>Instructions for use.</p>

In this example, the image includes conditions:

  • <alt> provides a brief, alternative description for users who can see the image.
  • <alt-text> offers a link to a detailed image description for users who require it.
  • <text> serves as a general message encouraging users to access the detailed description in case they cannot see the image.

When generating the documentation, the author can choose to include the “alt-text” condition for users who need it, thereby ensuring accessibility compliance.