Skip to content

[Spinner] - hardcoded aria-label attribute #11750

Description

@dgdavid

Describe the problem

Edit 4/11/2025:

This issue should be scoped to just updating how we're defining the default value of the aria-label on Spinner. Ideally we want the default value to be rendered in the props table, rather than rendering as though there isn't any default value currently.

Original comment:

The Spinner component hardcodes aria-label attribute when neither aria-label nor aria-labelledby is provided.

{...(!ariaLabel && !ariaLabelledBy && { 'aria-label': 'Contents' })}

How do you reproduce the problem?

Mount a Spinner without providing an aria-label or aria-labelledby.

Expected behavior

A spinner without a hardcoded English value. The component should allow consumers to use it without aria-label or aria-labelledby. It might be just a complementary visual hint hidden from the a11y tree using aria-hidden when rendered alongside relevant text.

Is this issue blocking you?

Somehow. A workaround exists by setting aria-labelledby, but it would be preferable if, as said above, the spinner could be used as a visual hint for sighted users while being excluded from the a11y tree.

Screenshots

N/A

What is your environment?

N/A

What is your product and what release date are you targeting?

N/A

Any other information?


Jira Issue: PF-1462

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for Tech debt.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions