SLDS Scenario-Based Questions

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

You are designing a new Lightning Web Component (LWC) for a customer dashboard. The requirement is to maintain a consistent Salesforce look and feel without writing custom CSS. How should you achieve this?

  • Import SLDS styles in the JavaScript file
  • Manually define styles for fonts and colors in a CSS file
  • Use SLDS class names in your LWC's HTML markup (correct)

A stakeholder reports that a button in your LWC does not match the standard Salesforce UI. It looks different from other buttons in Lightning Experience. What should you do?

  • Apply the `slds-button` class to the button (correct)
  • Write a custom CSS rule to style the button
  • Use JavaScript to modify the button's appearance dynamically

Your team is building a mobile-responsive Salesforce application. How can you ensure that all UI components adjust properly across different screen sizes?

  • Use `slds-grid` and `slds-col` for responsive layouts (correct)
  • Set fixed `px` widths in CSS for consistent sizing
  • Write custom JavaScript to detect screen size and adjust styles

Your company wants to standardize branding colors across all Salesforce applications without modifying each component individually. What is the best approach?

<p>Use the Lightning Token Editor to modify SLDS design tokens (A)</p> Signup and view all the answers

A form layout looks cluttered because input fields are misaligned, making it hard to read. How can you improve form readability while maintaining SLDS compliance?

<p>Use <code>slds-form_horizontal</code> for desktop and <code>slds-form_stacked</code> for mobile (A)</p> Signup and view all the answers

Your manager asks you to create a data table where users can select multiple rows. How should you implement this using SLDS?

<p>Use the <code>slds-table--selectable</code> class (A)</p> Signup and view all the answers

A customer wants required fields in an LWC form to be clearly marked. How should you indicate required fields according to SLDS best practices?

<p>Add the <code>slds-required</code> class to the label element (B)</p> Signup and view all the answers

A data table in your LWC is truncating long text entries, making it hard for users to read. How can you allow text wrapping while keeping SLDS compliance?

<p>Apply the <code>slds-cell-wrap</code> class to table cells (B)</p> Signup and view all the answers

A stakeholder wants to add a searchable dropdown to an LWC form. Which SLDS component should you use?

<p><code>slds-combobox</code> (A)</p> Signup and view all the answers

You need to display an error message when a user enters incorrect data into a form field. What is the SLDS-compliant way to handle this?

<p>Use the <code>slds-form-element_help</code> class to show an error message (C)</p> Signup and view all the answers

Your company wants to update the default font used across all Salesforce Lightning pages. What is the best way to apply this change?

<p>Use the <code>$font-family-base</code> design token (C)</p> Signup and view all the answers

A visually impaired user reports difficulty distinguishing text from the background in your LWC application. How can you improve accessibility?

<p>Use SLDS high-contrast color tokens (B)</p> Signup and view all the answers

You are designing a Salesforce page for right-to-left (RTL) languages like Arabic and Hebrew. How can you ensure proper text alignment?

<p>Use SLDS RTL-specific classes (A)</p> Signup and view all the answers

Your company wants to apply a custom brand color to all primary buttons in Lightning Experience. What is the best approach?

<p>Update the <code>$button-brand-background</code> design token (A)</p> Signup and view all the answers

A user reports that a form field's label is not being read by a screen reader. How can you fix this issue?

<p>Ensure the label has an associated <code>for</code> attribute linked to the input field (C)</p> Signup and view all the answers

Your LWC page loads slowly because it contains a very large data table with hundreds of rows. What is the best way to improve performance?

<p>Implement pagination or lazy loading (B)</p> Signup and view all the answers

A developer wants to add custom icons to a Lightning page without increasing load time. What is the best approach?

<p>Use SLDS utility classes for SVG icons (A)</p> Signup and view all the answers

You need to implement a progress indicator for a multi-step user journey in Salesforce. Which SLDS component should you use?

<p><code>slds-progress</code> (A)</p> Signup and view all the answers

A customer wants modal dialogs in their Lightning Experience to be fully accessible and support keyboard navigation. What should you do?

<p>Use <code>slds-modal</code> with ARIA attributes and keyboard focus trapping (B)</p> Signup and view all the answers

A team member suggests overriding SLDS styles with global CSS rules to fine-tune the UI appearance. What should you tell them?

<p>This is not recommended because SLDS updates can break custom styles (B)</p> Signup and view all the answers

A customer reports that users are having difficulty distinguishing buttons from background colors in your LWC app. How can you improve button visibility while keeping SLDS compliance?

<p>Use SLDS contrast-aware design tokens for buttons (C)</p> Signup and view all the answers

You need to add an alert notification in your Lightning app to inform users about a successful operation. Which SLDS component should you use?

<p><code>slds-notify_alert</code> (A)</p> Signup and view all the answers

A client requests a collapsible sidebar navigation menu in their Lightning page. Which SLDS component should you implement?

<p><code>slds-navigation-list</code> (B)</p> Signup and view all the answers

A stakeholder wants to ensure that all tables in an LWC application maintain column alignment when resized. Which SLDS class should you use?

<p><code>slds-table_fixed-layout</code> (A)</p> Signup and view all the answers

You need to display a numerical progress indicator for a long process in your LWC app. Which SLDS component should you use?

<p><code>slds-progress</code> (C)</p> Signup and view all the answers

Your team is implementing a step-by-step user guide inside Salesforce. Which SLDS component would best fit this requirement?

<p><code>slds-walkthrough</code> (C)</p> Signup and view all the answers

A product owner requests that all modals used in a Lightning app follow accessibility standards, including screen reader support. What should you do?

<p>Ensure <code>slds-modal</code> includes ARIA roles and focus trapping (A)</p> Signup and view all the answers

Your LWC component has a list of links that appear incorrectly spaced on smaller screens. Which SLDS utility class should you apply to maintain proper spacing?

<p><code>slds-m-around_small</code> (A)</p> Signup and view all the answers

A customer asks for a way to display time-sensitive notifications inside Salesforce without requiring user interaction. Which SLDS component is the best choice?

<p><code>slds-toast</code> (A)</p> Signup and view all the answers

Your company requires a data entry form where fields dynamically resize based on the available screen space. Which SLDS class should be used for proper responsiveness?

<p><code>slds-size_1-of-1</code> or <code>slds-size_1-of-2</code> (A)</p> Signup and view all the answers

A user reports that a modal window does not close when they press the Escape key. How should you fix this while maintaining SLDS best practices?

<p>Ensure <code>slds-modal</code> has keyboard event listeners for Escape (B)</p> Signup and view all the answers

Your design team wants to implement a flexible card-based UI that automatically adjusts to different screen sizes. Which SLDS class should you use?

<p><code>slds-card</code> (C)</p> Signup and view all the answers

A stakeholder wants to allow users to filter data in a Lightning table dynamically. Which SLDS component would best support this feature?

<p><code>slds-combobox</code> combined with a search function (C)</p> Signup and view all the answers

Your company wants to introduce a tabbed interface within a Lightning page to organize content effectively. What is the recommended SLDS component?

<p><code>slds-tabs</code> (B)</p> Signup and view all the answers

A developer wants to add a floating help button to an LWC component, ensuring it remains positioned at the bottom right corner. Which SLDS class should they use?

<p><code>slds-is-fixed</code> with <code>slds-align-bottom</code> (A)</p> Signup and view all the answers

Your design team wants a way to visually separate form sections without using borders. What SLDS class should you apply?

<p><code>slds-has-divider_top-space</code> (A)</p> Signup and view all the answers

A user reports that a button appears disabled but is still clickable. What SLDS class should you apply to ensure proper behavior?

<p><code>slds-button_disabled</code> (A)</p> Signup and view all the answers

Your company wants to highlight urgent notifications in red. Which SLDS utility class should you use?

<p><code>slds-text-color_error</code> (B)</p> Signup and view all the answers

Your team is implementing a loading animation for a data-heavy process. Which SLDS component should you use?

<p><code>slds-spinner</code> (C)</p> Signup and view all the answers

A stakeholder requests that a form should include inline help text next to specific fields. Which SLDS element should you use?

<p><code>slds-form-element_help</code> (B)</p> Signup and view all the answers

Flashcards

Consistent Salesforce Look

Use SLDS class names in your LWC's HTML markup to maintain a consistent Salesforce look and feel without custom CSS.

Standard Button UI

Apply the slds-button class to ensure your button matches the standard Salesforce UI.

Mobile-Responsive Layout

Use slds-grid and slds-col for responsive layouts, ensuring UI components adjust properly across different screen sizes.

Standardize Branding Colors

Use the Lightning Token Editor to modify SLDS design tokens, standardizing branding colors across all Salesforce applications.

Signup and view all the flashcards

Improve Form Readability

Use slds-form_horizontal for desktop and slds-form_stacked for mobile to improve form readability while maintaining SLDS compliance.

Signup and view all the flashcards

Selectable Data Table

Use the slds-table--selectable class to implement a data table where users can select multiple rows.

Signup and view all the flashcards

Mark Required Fields

Add the slds-required class to the label element to clearly mark required fields in an LWC form.

Signup and view all the flashcards

Text Wrapping in Table

Apply the slds-cell-wrap class to table cells to allow text wrapping while keeping SLDS compliance.

Signup and view all the flashcards

Searchable Dropdown

Use slds-combobox for a searchable dropdown in an LWC form.

Signup and view all the flashcards

Display Form Error Message

Use the slds-form-element__help class to show an error message when a user enters incorrect data into a form field.

Signup and view all the flashcards

Update Default Font

Use the $font-family-base design token to update the default font used across all Salesforce Lightning pages.

Signup and view all the flashcards

Improve Accessibility

Use SLDS high-contrast color tokens to improve accessibility for visually impaired users.

Signup and view all the flashcards

Proper Text Alignment

Use SLDS RTL-specific classes to ensure proper text alignment for right-to-left (RTL) languages.

Signup and view all the flashcards

Custom Brand Color

Update the $button-brand-background design token to apply a custom brand color to all primary buttons.

Signup and view all the flashcards

Screen Reader Accessibility

Ensure the label has an associated for attribute linked to the input field so that a form field’s label is read by screen readers.

Signup and view all the flashcards

Improve Table Performance

Implement pagination or lazy loading to improve performance for large data tables.

Signup and view all the flashcards

Add Custom Icons

Use SLDS utility classes for SVG icons to add custom icons to a Lightning page without increasing load time.

Signup and view all the flashcards

Progress Indicator

Use slds-progress to implement a progress indicator for a multi-step user journey.

Signup and view all the flashcards

Accessible Modal Dialogs

Use slds-modal with ARIA attributes and keyboard focus trapping for fully accessible modal dialogs.

Signup and view all the flashcards

Overriding SLDS Styles

Overriding SLDS with CSS is not recommended because SLDS updates can break custom styles.

Signup and view all the flashcards

Consistent look with SLDS

Using SLDS class names in LWC's HTML ensures a consistent look without custom CSS.

Signup and view all the flashcards

Standard button style

Applying slds-button class ensures the button matches standard Salesforce UI.

Signup and view all the flashcards

Responsive Layout

Using slds-grid and slds-col makes your layout responsive on different screens.

Signup and view all the flashcards

Consistent branding

Lightning Token Editor modifies SLDS design tokens for consistent branding.

Signup and view all the flashcards

Readable form layout

slds-form_horizontal for desktop, slds-form_stacked for mobile improves readability.

Signup and view all the flashcards

Selectable table rows

Class slds-table--selectable lets users select multiple rows in a table.

Signup and view all the flashcards

Required field marker

Add slds-required class to label marks in LWC form required fields.

Signup and view all the flashcards

Wrap table cell text

slds-cell-wrap class lets table cells wrap long text entries.

Signup and view all the flashcards

Searchable dropdown

slds-combobox is used for searchable dropdowns in LWC forms.

Signup and view all the flashcards

Error message display

slds-form-element__help class shows an error message for incorrect data.

Signup and view all the flashcards

Improve Button Visibility

Use SLDS contrast-aware button tokens for buttons.

Signup and view all the flashcards

Display Alert Notification

Use slds-notify_alert to display an alert notification.

Signup and view all the flashcards

Collapsible Sidebar Menu

Use component slds-navigation-list for collapsible sidebar navigation.

Signup and view all the flashcards

Maintain Column Alignment

Use class slds-table_fixed-layout to maintain column alignment.

Signup and view all the flashcards

Numerical Progress Indicator

Use slds-progress to display a numerical progress indicator.

Signup and view all the flashcards

Step-by-Step User Guide

Use slds-walkthrough component.

Signup and view all the flashcards

Accessible modals

Ensure slds-modal includes ARIA roles and focus trapping.

Signup and view all the flashcards

Proper Link Spacing

Use slds-m-around_small utility class to maintain spacing.

Signup and view all the flashcards

Time-Sensitive Notifications

Use slds-toast for time-sensitive notifications.

Signup and view all the flashcards

Dynamically Resize Form Fields

Use slds-size_1-of-1 or slds-size_1-of-2 for proper form responsiveness.

Signup and view all the flashcards

Modal Closes with Escape Key

Ensure slds-modal has keyboard event listeners for Escape.

Signup and view all the flashcards

Flexible Card-Based UI

Use slds-card class. Offers a flexible layout.

Signup and view all the flashcards

Filter Table Data

Use slds-combobox combined with search function.

Signup and view all the flashcards

Tabbed Interface

Use component slds-tabs to organize content effectively.

Signup and view all the flashcards

Floating Bottom Help Button

Use slds-is-fixed with slds-align-bottom.

Signup and view all the flashcards

Visually Separate Sections

Use slds-has-divider_top-space to separate sections.

Signup and view all the flashcards

Truly Disable Button

Use slds-button_disabled class.

Signup and view all the flashcards

Highlight Notifications

To show errors, use slds-text-color_error utility class.

Signup and view all the flashcards

Loading Animation

Use slds-spinner component for process heavy animation.

Signup and view all the flashcards

Form Inline Help Text

Use slds-form-element__help to add form inline hekp text next to the related field.

Signup and view all the flashcards

Enhance contrast button

Use SLDS contrast-aware design tokens for buttons.

Signup and view all the flashcards

Alert Display

slds-notify_alert displays successful operation alerts.

Signup and view all the flashcards

Collapsible Component

slds-navigation-list creates a collapsible sidebar easily

Signup and view all the flashcards

Column Consistency

slds-table_fixed-layout helps maintain column allignment on resize.

Signup and view all the flashcards

Numerical Meter

slds-progress provides the best indication.

Signup and view all the flashcards

Step-by-Step Guide

slds-walkthrough is best.

Signup and view all the flashcards

Access Standards

Modal must include ARIA roles.

Signup and view all the flashcards

Screen Spacing

slds-m-around_small should be applied.

Signup and view all the flashcards

Time Component

slds-toast is best for time-sensitive notifications.

Signup and view all the flashcards

Device Response

slds-size_1-of-1 ensures resizing on all devices.

Signup and view all the flashcards

Study Notes

Salesforce UX Designer Exam - Additional SLDS Scenario-Based Questions

Lightning Web Component (LWC) Design

  • To maintain a consistent Salesforce look and feel without custom CSS in an LWC, use SLDS class names in the LWC's HTML markup

Styling Buttons in LWC

  • To match standard Salesforce UI buttons in an LWC apply the slds-button class to the button

Building Mobile-Responsive Salesforce Applications

  • Use slds-grid and slds-col for responsive layouts to ensure UI components adjust properly across different screen sizes

Standardizing Branding Colors

  • Modify SLDS design tokens using the Lightning Token Editor to standardize branding colors across all Salesforce applications without modifying each component individually

Improving Form Readability

  • Use slds-form_horizontal for desktop and slds-form_stacked for mobile to improve form readability while maintaining SLDS compliance

Creating a Data Table with Selectable Rows

  • Use the slds-table--selectable class to create a data table where users can select multiple rows

Marking Required Fields

  • Add the slds-required class to the label element to indicate required fields according to SLDS best practices

Allowing Text Wrapping in a Data Table

  • Apply the slds-cell-wrap class to table cells to allow text wrapping while keeping SLDS compliance

Adding a Searchable Dropdown

  • Use the slds-combobox component to add a searchable dropdown to an LWC form

Displaying Error Messages

  • Use the slds-form-element_help class to display an error message when a user enters incorrect data into a form field in an SLDS-compliant way

Updating Default Font

  • Use the $font-family-base design token to update the default font used across all Salesforce Lightning pages

Improving Accessibility

  • Use SLDS high-contrast color tokens to improve accessibility for visually impaired users
  • Use SLDS contrast-aware design tokens for buttons to improve button visibility while keeping SLDS compliance

Ensuring Proper Text Alignment

  • Use SLDS RTL-specific classes when designing a Salesforce page for right-to-left (RTL) languages like Arabic and Hebrew to ensure proper text alignment

Applying a Custom Brand Color

  • Update the $button-brand-background design token to apply a custom brand color to all primary buttons in Lightning Experience

Ensuring Screen Reader Compatibility

  • Ensure the label has an associated for attribute linked to the input field so a form field's label is read by a screen reader

Improving LWC Page Performance

  • Implement pagination or lazy loading to improve performance of an LWC page that contains a very large data table with hundreds of rows

Adding Custom Icons

  • Use SLDS utility classes for SVG icons to add custom icons to a Lightning page without increasing load time

Implementing a Progress Indicator

  • Use slds-progress to display a numerical progress indicator for a long process in your LWC app.
  • Includes slds-progress component to implement a progress indicator for a multi-step user journey in Salesforce

Supporting Keyboard Navigation

  • Use slds-modal with ARIA attributes and keyboard focus trapping in modal dialogs to be fully accessible and support keyboard navigation
  • Ensure slds-modal has keyboard event listeners for Escape to fix an issue where a modal window does not close when pressing the Escape key

Overriding SLDS Styles

  • Overriding SLDS styles with global CSS is not recommended because SLDS updates can break custom styles

Alerts and Notifications

  • Use slds-notify_alert to add an alert notification in your Lightning app to inform users about a successful operation
  • Use slds-toast to display time-sensitive notifications inside Salesforce without requiring user interaction
  • Implement slds-navigation-list for a collapsible sidebar navigation menu in Lightning pages
  • To introduce a tabbed interface within a Lightning page, use 'slds-tabs' to organize content effectively

Tables

  • 'slds-table_fixed-layout' ensures all tables in an LWC application maintain column alignment when resized

User interface components

Implement slds-walkthrough for a step-by-step user guide inside Salesforce For a data-heavy process, utilize slds-spinner to implement a loading animation Place floating help button in an LWC component using 'slds-is-fixed' with slds-align-bottom to ensure its positioned at the bottom right corner When a customer wants modal dialogs in their lightning experience to be fully accessible and support keyboard navigation then use slds-modal with ARIA attributes and keyboard focus trapping

Layout and Spacing

  • Apply slds-has-divider_top-space to visually separate form sections without using borders
  • Use the slds-m-around_small SLDS utility class to maintain proper spacing of links that appear incorrectly spaced on smaller screens in your LWC component
  • Utilize slds-grid-flex or slds-size_1-of-1 or slds-size_1-of-2 SLDS class for a data entry form where fields dynamically resize based on the available screen space, and allows for proper responsiveness

Behavior

  • Apply slds-button_disabled to ensure proper behavior of the button reporting appearing disabled but still clickable

Highlighting and Emphasis

  • Use 'slds-text-color_error' to highlight urgent notifications in red.

Forms

  • Add inline help text next to specific fields in a form, using the ´slds-form-element_help´ element

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

More Like This

Use Quizgecko on...
Browser
Browser