Skip to content

Theme and accessibility

Guide3 min read

The Record Health Check card on a Salesforce Lightning record page takes its colors, fonts, spacing, and corner shapes from the org’s active Salesforce theme. It has no theme setting of its own. Verify that the card is readable and works with a keyboard and a screen reader on your pages.

The card uses Salesforce Lightning Design System (SLDS) styling hooks, so it follows both the standard Lightning theme and the SLDS 2 Cosmos theme without any configuration. To see the org’s theme, open Setup → Themes and Branding. When the theme changes, the card changes with it; you do not need to replace the component or keep separate pages for different themes.

Colors, corner shapes, shadows, and spacing can differ between themes. These stay the same in every theme:

  • the order of the Check rows and the result labels;
  • headings and the reading order for screen readers;
  • keyboard navigation and visible focus;
  • the names that screen readers announce for buttons, links, and results; and
  • how the card fits narrow page regions and small screens.
FeatureBehavior
Results in wordsEvery result has a text label, such as Warning or Unable to Check, in addition to its color and icon.
Screen reader announcementsLoading, run progress, and setup messages are announced as status updates. Each row has a name that includes the Check title and result.
Icon-only buttonWith Run Button Display set to Show icon only, the button keeps its Run or Rerun name for screen readers.
Long textLong messages, fix instructions, and values are shortened to a preview with an expand control, and a screen reader hears up to 500 characters before the control.
High contrastIn Windows high contrast mode, the card uses the system colors.
Reduced motionWhen the operating system asks for reduced motion, the card does not animate.
Narrow layoutsBelow about 480 pixels wide, the card rearranges rows and values so text wraps without horizontal scrolling.

Use a record page where the card is active, with a Check Set that produces several kinds of result. The installed example Check Sets work well.

  1. Open a record whose object matches the Check Set, and run the card.
  2. Confirm that each result label you see, such as Pass, Failed, Warning, Info, Skipped, Unable to Check, or System Error, is readable against its background.
  3. Press Tab to move through Run or Rerun, the row expand controls, and the links. Confirm that each control shows a visible focus outline and that Enter or Space activates it.
  4. Narrow the browser window until the card is about 480 pixels wide. Confirm that text wraps and every control remains usable without horizontal scrolling.
  5. With a screen reader, confirm that the result of each Check is announced with its title.

First reproduce the problem with the browser zoom at 100 percent and with browser extensions that change page styles turned off.

What you seeWhat to check
The card is narrower or more cramped on one pageThe page region the card is in and the components around it. Move the card to a wider region if needed.
Text or a result color is hard to readThe org’s active theme and the browser’s accessibility settings. Report the theme and the result label if the problem remains.
The card looks different in standard and Cosmos themesExpected for colors and shapes. Confirm that labels, focus, and reading order are the same.

Lightning App Builder shows only the Check Set property for the component. There is no theme, color, or CSS setting to change.