Lightning Activity Timeline

Salesforce Lightning activity timeline displays each of the user’s upcoming, current, and past activities. Each Activity timeline item receives its width from the parent list. It can consume the full width of the main page area or be placed in the smaller right sidebar.

Lightning Activity Timeline – Accessibility

Text describing the type of timeline item is placed in a span. It is the first element in the timeline item and should be hidden with the slds-assistive-text class. The SVG image does not need the slds-assistive-text class.

Button:

  • aria-controls is used to create an association between the button and the details section. If the details section has an id="email-content", then the button should have aria-controls="email-content".
  • The title of the timeline item can also be used as a button to open the details section. If the details section has an id="email-content", then the div with slds-timeline__trigger should have aria-controls="email-content" and the click handler.
  • aria-expanded indicates if the details section is open or closed and is read aloud by assistive technology when the button is focused.

Section:

  • aria-hidden indicates if the details section is open or closed, and if set to true, assistive technology hides the details section.
  • The button should behave as a normal button. The user should be able to tab to focus it and press enter/space to activate it.

Activity Timeline – CSS Classes

The following table lists out the CSS classes for Lightning Activity Timeline component, their usage, and the CSS selectors that these Activity TimelineCSS classes can be used on.

CSS Class NameDescription
slds-timelineInitializes activity timeline.
This CSS class can be used for the elements with CSS selector ul only.
slds-avatar__initialsUsed for initials inside an avatar.
This CSS class can be used for the elements with CSS selector .slds-avatar abbr only.
slds-timeline__item_expandableCreate each expandable activity timeline item in a list.
This CSS class can be used for the elements with CSS selector .slds-timeline div only.
slds-timeline__item_detailsClass to show and hide details.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable article only.
slds-is-openToggles the visibility of the timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable only.
slds-timeline__item_callApplies line connector for a call timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable only.
slds-timeline__item_emailApplies line connector for an email timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable only.
slds-timeline__item_eventApplies line connector for an event timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable only.
slds-timeline__item_taskApplies line connector for a task timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable only.
slds-timeline__iconIcon associated with timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable .slds-icon_container only.
slds-timeline__details-action-iconIcon inside of actionable button within an expandable timeline item.
This CSS class can be used for the elements with CSS selector .slds-timeline__item_expandable svg only.