microsoft / fast

The adaptive interface system for modern web experiences.
https://www.fast.design
Other
9.17k stars 587 forks source link

Non-unique ids when rendering multiple TextField components #6962

Closed brianchristopherbrady closed 2 months ago

brianchristopherbrady commented 2 months ago

🐛 Bug Report

Accessibility warnings for non-unique id attributes when rendering multiple instances of the FASTTextField component.

💻 Repro or Code Sample

Create multiple instances of the FASTTextField component in a single page and run an accessibility audit or tool like Accessibility Insights.

🤔 Expected Behavior

Each instance of the FASTTextField component should have a unique id for its internal control element to pass accessibility audits.

😯 Current Behavior

Accessibility warnings for non-unique id attributes are shown when rendering multiple instances of the FASTTextField component.

💁 Possible Solution

Consider removing the static id from the internal control element or make it unique for each instance.

🔦 Context

This issue causes accessibility warnings, which can affect the accessibility compliance of the application.

🌍 Your Environment

chrisdholt commented 2 months ago

ID's are unique to each document instance - ID's within the shadow DOM are considered unique. Closing this as "by design".