Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aria-invalid attributes to have a valid 'true' value #3639

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/@headlessui-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Use correct `ownerDocument` when using internal `<Portal/>` element ([#3594](https://github.com/tailwindlabs/headlessui/pull/3594))
- Bump `@tanstack/react-virtual` to be fix warnings in React 19 projects ([#3588](https://github.com/tailwindlabs/headlessui/pull/3588))
- Fix `aria-invalid` attributes to have a valid `'true'` value ([#3639](https://github.com/tailwindlabs/headlessui/pull/3639))

## [2.2.0] - 2024-10-25

Expand Down
2 changes: 1 addition & 1 deletion packages/@headlessui-react/src/components/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function InputFn<TTag extends ElementType = typeof DEFAULT_INPUT_TAG>(
id,
'aria-labelledby': labelledBy,
'aria-describedby': describedBy,
'aria-invalid': invalid ? '' : undefined,
'aria-invalid': invalid ? 'true' : undefined,
disabled: disabled || undefined,
autoFocus,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function SelectFn<TTag extends ElementType = typeof DEFAULT_SELECT_TAG>(
id,
'aria-labelledby': labelledBy,
'aria-describedby': describedBy,
'aria-invalid': invalid ? '' : undefined,
'aria-invalid': invalid ? 'true' : undefined,
disabled: disabled || undefined,
autoFocus,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function TextareaFn<TTag extends ElementType = typeof DEFAULT_TEXTAREA_TAG>(
id,
'aria-labelledby': labelledBy,
'aria-describedby': describedBy,
'aria-invalid': invalid ? '' : undefined,
'aria-invalid': invalid ? 'true' : undefined,
disabled: disabled || undefined,
autoFocus,
},
Expand Down
Loading