You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever a labelled ChekcboxField component which has no "id" prop is created, no "id" attribute is generated automatically for the resultant rendered <input type="chekcbox"> element. This has severe implications for instance such that no accessible name is narrated for the checkbox when focused using a screen reader.
Repro steps
In the code, create a labelled CheckboxField component like this: <CheckboxField label="Example" />
Observe the resultant rendered <input type="checkbox"> element, e.g. via the browser developer tools.
Actual behavior
Observe that no "id" attribute is generated for the resultant checkbox element.
Expected behavior
An "id" attribute should be generated for the resultant checkbox element, that corresponds to the "for" attribute of the relevant <label> element.
Logs
No response
Requested priority
High
Products/sites affected
Fluent UI v9
Are you willing to submit a PR to fix?
no
Validations
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The provided reproduction is a minimal reproducible example of the bug.
The text was updated successfully, but these errors were encountered:
adamsamec
changed the title
[Bug]: ChekcboxField label gets mixed with InputField label when no "id" attribute is set
[Bug]: ChekcboxField does not automatically generate "id" attributewhen not given via props
Oct 4, 2022
adamsamec
changed the title
[Bug]: ChekcboxField does not automatically generate "id" attributewhen not given via props
[Bug]: ChekcboxField component does not automatically generate "id" attribute when not given via props
Oct 4, 2022
khmakoto
changed the title
[Bug]: ChekcboxField component does not automatically generate "id" attribute when not given via props
[Bug]: CheckboxField component does not automatically generate "id" attribute when not given via props
Oct 7, 2022
microsoft
locked as resolved and limited conversation to collaborators
Nov 7, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Library
React Components / v9 (@fluentui/react-components)
System Info
Are you reporting Accessibility issue?
yes
Reproduction
(https://codesandbox.io/s/elegant-breeze-idk6eg?file=/example.tsx)[https://codesandbox.io/s/elegant-breeze-idk6eg?file=/example.tsx)
Bug Description
Whenever a labelled ChekcboxField component which has no "id" prop is created, no "id" attribute is generated automatically for the resultant rendered <input type="chekcbox"> element. This has severe implications for instance such that no accessible name is narrated for the checkbox when focused using a screen reader.
Repro steps
Actual behavior
Observe that no "id" attribute is generated for the resultant checkbox element.
Expected behavior
An "id" attribute should be generated for the resultant checkbox element, that corresponds to the "for" attribute of the relevant <label> element.
Logs
No response
Requested priority
High
Products/sites affected
Fluent UI v9
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: