app-launcher
About App Launcher
The App Launcher is a modal dialog which contains 2 sections of information. The top section is a list of all the applications installed in the organization, and the second section is the list of items in that organization.
The 2 sections are implemented as Expandable Sections and can be expanded or collapsed. Applications and Items are also searchable within the modal via the search input in the modal header.
Base
<section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large slds-app-launcher" aria-labelledby="header43" aria-modal="true" aria-describedby="modal-content-id-1">
<div class="slds-modal__container">
<header class="slds-modal__header slds-grid slds-grid_align-spread slds-grid_vertical-align-center">
Description overflow
When the tile description is too long to fit on 2 lines, a "more" button
is shown after an ellipsis. Text truncation isn't handled via CSS in the case of an App Launcher Tile due to the responsive nature of the tile size.
Truncate via JavaScript
Multi-line truncation can only be done via JavaScript. You should calculate how many characters will fit over a maximum of 2 lines, depending on the tile width and trim the string accordingly.
On hover or focus, the more button
will display the full description using a Tooltip
<div draggable="true" class="slds-app-launcher__tile slds-text-link_reset slds-is-draggable">
<div class="slds-app-launcher__tile-figure">
<span class="slds-avatar slds-avatar_large">
Reordering tiles via drag and drop
App tiles can be re-ordered via mouse drag and drop or with the keyboard via the use of the grab handle button under the avatar. The grab handle button is implemented as a Stateful Icon Button
Communicating to assistive technology
When implementing drag and drop it is important to be able to communicate what is happening visually on the screen to assistive technology users. We do this via an Assertive Live Region, which is placed before the list of tiles, and has
aria-live="assertive"
Tile grabbed
When a tile is grabbed add the class name of slds-is-grabbed
to the tile class list. When initiating the grab via the stateful button, be sure to set aria-pressed="true"
on the button. Also be sure to update the contents of the live region to communicate what was grabbed, its current position and how to move the item. Something like: "Sales Cloud: current position 1 of 6. Use the up and down arrows to move this app"
<section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large slds-app-launcher" aria-labelledby="header43" aria-modal="true" aria-describedby="modal-content-id-1">
<div class="slds-modal__container">
<header class="slds-modal__header slds-grid slds-grid_align-spread slds-grid_vertical-align-center">
Tile moved in list
When the tile is moved in the list using a keyboard, update the live region for every move to indicate its new position to the user. Something like: "Sales Cloud: new position 3 of 6."
<section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large slds-app-launcher" aria-labelledby="header43" aria-modal="true" aria-describedby="modal-content-id-1">
<div class="slds-modal__container">
<header class="slds-modal__header slds-grid slds-grid_align-spread slds-grid_vertical-align-center">
Tile dropped
Finally, when a tile is dropped into its final position, reset aria-pressed
to be false
on the stateful button, and update the live region to inform the user of the items final position. e.g. "Sales Cloud: final position 4 of 6."
<section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large slds-app-launcher" aria-labelledby="header43" aria-modal="true" aria-describedby="modal-content-id-1">
<div class="slds-modal__container">
<header class="slds-modal__header slds-grid slds-grid_align-spread slds-grid_vertical-align-center">
Searching
When using the search input at the top of the modal, the list of applications and items filters as the user types. The remaining items on display have the matching search term highlighted with the use of the <mark />
element wrapping the matching term. This creates the visual highlight around the term.
<section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open slds-modal_large slds-app-launcher" aria-labelledby="header43" aria-modal="true" aria-describedby="modal-content-id-1">
<div class="slds-modal__container">
<header class="slds-modal__header slds-grid slds-grid_align-spread slds-grid_vertical-align-center">