Skip to content

[RAC] Use of useLabels() is inconsistent across components #7240

@nwidynski

Description

@nwidynski

Provide a general summary of the issue here

I was wondering why useLabels() is not used consistently throughout the project even though most components inherit the AriaLabelingProps and therefore have both aria-label & aria-labelledby available. I don't think it causes issues in most cases but i am sure it has some edge cases that warranted the existence of useLabels() in the first place.

Examples of missing useLabels():

  • Button
  • Breadcrumbs
  • ...
  • Pretty much all components not utilizing useLabel() in some way.

🤔 Expected Behavior?

useLabels() should be applicable to all components inheriting AriaLabelingProps.

😯 Current Behavior

Only field components and some other components make use of it.

💁 Possible Solution

Ensure that useLabels() is used to merge labels in all components.

🔦 Context

No response

🖥️ Steps to Reproduce

https://codesandbox.io/p/sandbox/jolly-https-rzwrzp

Version

latest

What browsers are you seeing the problem on?

Chrome

If other, please specify.

No response

What operating system are you using?

MacOS

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions