function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
NLTNLT 

Spinner Issue in LWC

Hi All, I facing below highlighted error when trying to implement the LWC code. Please help to resolve it.

<lightning-spinner> The alternativeText attribute should not be empty. Please add a description of what is causing the wait.
get validAlternativeText @ spinner.js:1

User-added image
PriyaPriya (Salesforce Developers) 

Hi,

Kindly refer this link :- 
https://salesforce.stackexchange.com/questions/174884/lightningspinner-solution-that-finally-works-using-custom-events-not-aurawai

If this helps, kindly mark it as the best answer.

Regards,

Priya Ranjan

TobyKutlerTobyKutler
Likely because your lightning spinner is missing an alternative-text tag. Make sure you LWC is rendering the spinner with syntax like the below that includes the alternative text tag: 
 
<lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
Chase FrisbieChase Frisbie
I'm happy to see the issue is soon regulated. Thankful to you for supporting us with the outcome. CFAHome (https://www.cfa-home.net/)
dolvex sanitdolvex sanit
To address the Spinner Issue in LWC (Lightning Web Component), you can follow these steps. Firstly, identify the component containing the spinner and its associated logic. Next, implement a Boolean variable, let's say "showSpinner," which will control the visibility of the spinner. Then, modify the code logic to set "showSpinner" to true when the desired event or action triggers the spinner's display, and set it to false once the action is completed or the event is resolved. In this scenario, let's assume you want to display the spinner while fetching data for the Freedom Cargo Box Location (https://trackacourier.com/freedom-cargo-balikbayan-box-tracking/). So, when the request for Freedom Cargo Box Location is made, set showSpinner to true, and upon receiving the data, set it to false. This way, the spinner will be shown during the data fetching process and hidden once the data is available, providing a seamless user experience.
alwip galferalwip galfer
In LWC (Lightning Web Components), encountering spinner issues can be frustrating for developers. The spinner, used to indicate loading or processing, may fail to display or persist even after the intended action completes. To resolve this, first, check if there are any JavaScript errors or code conflicts that might be interfering with the spinner component's functionality. Next, ensure that the spinner is correctly bound to the loading state variable and that it toggles on and off appropriately. If the problem persists, consider using browser developer tools to inspect network activity and identify any potential bottlenecks. Additionally, cleaning your gaming mouse pad is vital to maintain precise cursor movements and a hygienic gaming experience. Start by unplugging the mouse and removing it from the pad. Use a mixture of mild detergent and water on a soft cloth to gently clean the pad's surface, paying attention to any stubborn stains. Rinse the cloth and wipe the pad again to remove any residue. Allow the pad to air dry completely before reconnecting the mouse. Regularly cleaning gaming mouse pad (https://macrotester.com/how-to-clean-a-mousepad/) will not only improve its longevity but also enhance your gaming performance.
Apk ThrillsApk Thrills
Hello everyone, I'm encountering the following highlighted error while attempting to implement LWC code. Could you please assist me in resolving this?
<lightning-spinner> The alternativeText attribute should not be empty. Kindly provide a description of what is causing the wait. (https://apkthrills.com/)
Error originates from get validAlternativeText @ spinner.js:1. Your help is greatly appreciated.