Can links be used to provide context-sensitive help, tooltips, or online documentation in DITA?

In DITA XML, links can be effectively used to provide context-sensitive help, tooltips, or online documentation, enhancing the user experience by offering relevant information when it’s needed. This functionality is particularly valuable in software applications, websites, or any context where users may require additional guidance without leaving the current task or page.

DITA offers versatile linking mechanisms to enable context-sensitive help. You can utilize the <xref> or <link> elements to create these links. For example, when a user hovers over or clicks on an element in an application, you can trigger a tooltip or a context-sensitive help panel that displays specific information related to that element. This information is linked to DITA topics containing relevant content, ensuring that users receive precise assistance without navigating away from the primary content.


Suppose you want to provide context-sensitive help for a “Settings” button in a software application using DITA XML:

<!-- Example of linking context-sensitive help using <xref> in DITA XML -->
<button id="settings-button" onmouseover="showTooltip('settings-topic.dita')">Settings</button>

In this example, an <xref> is used to trigger a tooltip or context-sensitive help panel when the user hovers over the “Settings” button. The showTooltip JavaScript function is employed to display the relevant content from the “settings-topic.dita” DITA topic.