gsoft-inc / sg-orbit

The design system for ShareGate web apps.
https://orbit.sharegate.design
Apache License 2.0
102 stars 37 forks source link

🐛 "An input component must either have a 'aria-label' attribute..." error when a <label> is present. #1229

Open tjosepo opened 1 year ago

tjosepo commented 1 year ago

Describe the bug

Input elements log an error about accessibility when aria-label, aria-labelledby and placeholder are missing.

There is no check for <label> elements, which makes some accessible inputs still log an error.

Steps to reproduce

Create an element with this return:

<>
    <Label htmlFor="test">Label</Label>
    <TextInput id="test" />
</>

Expected results

There should be no errors. The text input has an accessible label.