Can DITA tables be tested for accessibility compliance?

Yes, DITA tables, like other web-based content, can and should be tested for accessibility compliance to ensure they are usable by people with disabilities. Accessibility testing of DITA tables involves evaluating the tables against recognized standards, such as the Web Content Accessibility Guidelines (WCAG).

Accessibility testing for DITA tables is the process of examining tables within DITA content to ensure they meet specific criteria that make them accessible to individuals with disabilities. This includes evaluating the tables for issues that might affect screen reader users, keyboard navigation, and other assistive technologies.

Accessibility testing for DITA tables typically involves verifying the semantic structure, checking row and column headers, using alternative text, testing keyboard navigation, checking color and contrast, correctly identifying data tables, and using testing tools.

Semantic Structure:

Ensure that DITA tables are structured using semantic HTML or XML elements that convey the appropriate meaning. For example, using <th> for table headers and <td> for table data cells.

Row and Column Headers:

Check that tables include proper header cells and row/column scope attributes. This is essential for screen reader users who rely on table headers for context.

Alternative Text:

Verify that tables containing non-text content, such as images, have appropriate alternative text.

Keyboard Navigation:

Test the tables using keyboard navigation to ensure that all interactive elements are reachable and operable.

Color and Contrast:

Check for color contrast issues that could impact users with visual impairments.

Data Tables:

Confirm that data tables are marked as data tables to assist screen readers in correctly interpreting the data. Use <table role=”table”>.

Testing Tools:

Utilize accessibility testing tools and screen readers to identify issues and to ensure the content complies with accessibility standards. Tools like WAVE, axe, and screen readers like JAWS or NVDA can be valuable.

Example:

A DITA table contains information about product specifications. To test its accessibility, the author or editor would use an accessibility testing tool or evaluate it manually.


        <table>
            <title>Product Specifications</title>
            <row>
                <entry>Product Name</entry>
                <entry>Product Image</entry>
                <entry>Product Description</entry>
            </row>
            <row>
                <entry>Widget 123</entry>
                <entry><image href="widget123.jpg" alt=""/> <!-- Missing alt text -->
                <entry>A high-quality widget for your needs.</entry>
            </row>
        </table>
    

In this example, an accessibility issue is present because the image in the second cell lacks an alt attribute, which is required to provide alternative text for the image. An accessibility test would identify this issue, and the correct alt text would be added to make the table accessible.