Recall & Review
beginner
What Tailwind CSS class creates a spin animation?The <code>animate-spin</code> class applies a continuous spinning animation to an element.Click to reveal answer
intermediate
How do you make a spinner accessible for screen readers?
Add
role="status" and include visually hidden text like <span class="sr-only">Loading...</span> to inform screen reader users.Click to reveal answer
beginner
Which HTML element is best to use for a spinner icon?
Use a semantic element like
<svg> or <div> with proper ARIA roles, not decorative images without meaning.Click to reveal answer
beginner
How can you control the size of a spinner in Tailwind?
Use width and height classes like
w-8 h-8 to set the spinner size responsively.Click to reveal answer
intermediate
Why is it important to use semantic HTML and ARIA roles with loading animations?
It helps users with disabilities understand the page state, improving accessibility and user experience.
Click to reveal answer
Which Tailwind class adds a spinning animation to an element?
✗ Incorrect
The correct Tailwind class for spinning animation is
animate-spin.What role attribute should you add to a spinner for accessibility?
✗ Incorrect
Use
role="status" to indicate a live region for loading status.Which Tailwind classes control the size of a spinner?
✗ Incorrect
Width and height classes like
w-8 h-8 set the spinner size.What is the purpose of adding
<span class="sr-only">Loading...</span> inside a spinner?✗ Incorrect
The
sr-only class hides text visually but makes it available to screen readers.Which HTML element is recommended for a spinner icon?
✗ Incorrect
<svg> is semantic and scalable for spinner icons.Explain how to create an accessible spinning loader using Tailwind CSS.
Think about animation, accessibility roles, and size control.
You got /4 concepts.
Describe why accessibility is important when adding loading animations on a webpage.
Consider users who cannot see the animation.
You got /4 concepts.