Skip to main content

Improve Clarity in Error Messages and Hyperlinks

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the importance of descriptive error messages and meaningful hyperlinks.
  • Write clear error messages that guide users to resolve issues.
  • Update hyperlink text to clearly describe the link’s destination.

You made great strides in improving the structure and navigability of your Salesforce org. To wrap it up, let’s focus on a couple more digital communication methods: error messages and hyperlinks. These are small details, but they play a big role in how all users understand and interact with your org. Clear, descriptive text ensures that everyone, regardless of how they access the org, can proceed with confidence.

In this final unit, you return to the Report an Accessibility Issue flow to identify and fix a confusing error message and a vague hyperlink. Keep in mind that these principles apply everywhere in your Salesforce org—whether you’re writing validation rules, configuring page layouts, or developing custom code. Make sure your words work for everyone.

The Impact of Clear Error Messages

Error messages are a critical form of feedback. When a user hits a roadblock, whether it’s a validation rule preventing a record save or a system error, the message they receive determines what happens next. A clear message guides them to a solution. A vague or overly-technical message leads to confusion, frustration, and often, abandoned tasks or bad data (gasp!).

This isn't just an accessibility issue; it’s an overall usability issue. The content of an error message affects everyone it’s displayed to. If a user can’t understand why an action failed, they can’t fix it.

Effective error messages should answer two main questions:

  1. What went wrong? Clearly identify the problem without using jargon.
  2. What should the user do? Provide specific instructions on how to resolve the issue. Do they need to format a date differently? Fill in a required field? Contact support?

By answering these questions, you empower users to correct mistakes and move forward, rather than leaving them stuck at a dead end.

Fix a Vague Error Message

Let’s go back to the Report an Accessibility Issue screen flow you updated earlier and take a closer look at the Operating System input field. Follow these steps to see what happens when specific data is entered in that field.

  1. Select “App Launcher” to open the App Launcher
  2. Select Service and open the Service App Home page.
  3. Navigate to the Report an Accessibility Issue screen flow at the bottom of the right column.
  4. In the Operating System field, enter Windows? (include the question mark)
  5. Select Submit.

The screen flow now shows a red, generic “Error” message below the Operating System field. But why? The reason isn’t obvious to any user based on this error message.

The Report an Accessibility Issue flow with a generic “Error” message corresponding to the preceding steps.

If you check the input field configuration in Flow Builder, you’ll find that this field accepts only alpha-numeric characters. If a user enters a special character, such as the question mark in our example, they receive an error and can’t submit the form. Let’s update the error message to make this requirement crystal clear.

Hands-on challenge note: In order to pass the challenge for this unit, you must complete the steps outlined in the badge content.

  1. Select Setup, then Setup.
  2. In Quick Find, enter and select Flows.
  3. Select Report an Accessibility Issue to open the flow editor.
  4. Select the Report an Accessibility Issue screen component.
  5. Select the Operating System text component.
  6. In the right panel, select Validate Input to expand the section.
  7. Update the error message to: Please use only letters and numbers. Special characters are not allowed.
  8. Select Done.

While simple, this error message makes it clear to the user what the issue is (they used a special character) and what they need to do to fix it (remove the special character).

Assistive technology users, particularly those using screen readers, often navigate web pages by pulling up a list of all the links on the page. This allows them to quickly scan for the specific resource they need without listening to the entire page.

In this mode, the surrounding context is stripped away. The screen reader announces only the hyperlinked text itself. This means your link text must be descriptive enough to stand on its own.

Imagine trying to find a specific resource in a list that reads:

  • Click here
  • Learn more
  • Click here
  • Read more
  • This link

It’s impossible to know where those links go without the surrounding context. Instead, use meaningful text that indicates the destination or action when the link is selected, such as “Read the 2026 Accessibility Report” or “Contact Support”. This ensures that every user knows exactly where a link will take them, regardless of how they navigate your page.

Let’s return to the flow. After the accessibility issue is submitted, a confirmation message is displayed with “Click here” hyperlinked. This link takes users to the case that was just created, which is clear when you view the hyperlink with the surrounding text, but it’s not clear if you read only the hyperlinked text.

Flow confirmation screen with generic “Click here” hyperlinked text.

  1. If needed, reopen the Report an Accessibility Issue flow in Flow Builder.
  2. Select the Confirmation screen element, then select the LinkText display text component.
  3. Highlight the entire sentence, “Click here to view your case”.
  4. Select the Link button and enter {!CaseURL} in the Link URL field.
  5. Select Save.

In the rich text editor, all of “Click here to view your case” is linked text.

  1. While you’re here, let’s make the font larger so it’s easier to see. Highlight “Click here to view your case” again, then set the font size to 14.
  2. Select Done.
  3. Save the flow as a new version.
  4. Activate the new version.
Note

Accessibility Note

While the confirmation font’s color contrast meets standards in light mode, it does not meet standards when viewed in dark mode. In a real-world scenario, you’d need to address this to ensure accessibility for users in both viewing modes.

Shift Left for Accessibility

Congratulations! You identified and fixed common accessibility mistakes in page layouts and screen flows. You also learned how to use browser tools to inspect your Salesforce pages and understand how assistive technology navigates them. Now you have the tools to audit your existing Salesforce implementation and remove barriers for your users.

That’s great but the most effective way to build an inclusive experience is to start early. Instead of waiting to fix issues after a product is built, incorporate these design standards into the earliest phases of your development process. This approach, known as “shifting left,” ensures that accessibility is a core requirement rather than an afterthought. By considering diverse user needs from day one when you’re gathering requirements, designing a page, or building a flow, you create better, more inclusive solutions for everyone.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback