Can conditional processing be used to control the visibility of accessible content in DITA outputs?

Conditional processing in DITA enables the management of accessible content visibility in DITA outputs. By defining specific conditions and applying them to elements or sections within topics, it becomes possible to select which content to include or exclude when generating output. This feature is essential for providing alternative content for users with disabilities, ensuring that only the necessary accessible content is visible, depending on the audience or output type.

Conditional processing in DITA is a versatile feature that allows the management of accessible content visibility in documentation.

Define Accessible Conditions:

To control accessible content, specific conditions are defined. For example, conditions such as “alt-text,” “screen-reader,” or “simplified” can be created to address different accessibility needs. These conditions serve as labels for content variations.

Apply Conditions:

Once conditions are defined, they can be applied to elements or sections within DITA topics. For example, images may be tagged with “alt-text” conditions to provide alternative descriptions for visually impaired users. Complex terminology can receive “simplified” conditions, and lengthy content can be marked with “screen-reader” conditions.

Generate Output:

During the output generation process, it is possible to specify which conditions to include. This allows the control of accessible content visibility based on the audience or intended output type. Standard users may see content without accessible conditions, while users with disabilities or specific accessibility requirements can access content tailored to their needs.

Example:

A company is creating a DITA topic for a product overview.


        <topic>
          <title>Product Overview</title>
          <body>
            <p>This is our innovative product:</p>
            <image href="product.jpg">
              <alt>If the image is not visible, access a detailed description <alt-text>here</alt-text>.</alt>
              <alt-text>Image: [link to a detailed image description]</alt-text>
            </image>
            <p>Product specifications, features, and usage instructions.</p>
          </body>
        </topic>
    

In this example, conditional processing is applied:

  • <alt> provides a brief, alternative description for standard users who can see the image.
  • <alt-text> offers a link to a detailed image description for users who need it, like screen reader users.

During output generation, the “alt-text” condition can be chosen for users who require it. This way, only those who need the accessible content will see it, enhancing the user experience and ensuring accessibility compliance.