Skip to content

[Spinner] Fix aria-hidden/role conflict and add optional label support #640

@ravisuhag

Description

@ravisuhag

Summary

Spinner is a custom loading indicator with shimmer animation. Has a conflicting accessibility pattern and minor CSS issues.

Improvements

1. Fix aria-hidden="true" with role="status" conflict

Setting aria-hidden="true" defeats the purpose of role="status". Either remove role="status" (for decorative spinners) or remove aria-hidden and add a screen-reader-only label.

2. Add optional ariaLabel prop

No way to provide contextual loading text (e.g., "Loading data...") for screen reader users.

3. Fix duplicate CSS display property

.spinner has both display: inline-block and display: flex. The flex overrides, making inline-block unnecessary.

4. Document animation timing rationale

Hardcoded animation delay values (-0.15s, -0.3s, etc.) lack documentation explaining the stagger logic.

Files

  • packages/raystack/raystack/components/spinner/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions