Files
headlessui/packages/@headlessui-react
Robin Malfait 87252e1c33 Fix aria-invalid attributes to have a valid 'true' value (#3639)
This PR fixes an issue with the `aria-invalid` attributes on some form
elements.

In theory this shouldn't matter and behaves the same as other
attributes. MDN also mentions that any other value than the known set of
values will be treated as `true`.

However, some tools, including the Accessibility tab in Google Chrome
will complain because we set it to `aria-invalid=""`.

We already used `'true'` for `aria-checked` as well, so this change
makes it more consistent.

It will also make sure that `aria-invalid:flex` in Tailwind CSS works as
expected because this compiles to:

```css
.aria-invalid\:flex {
  &[aria-invalid="true"] {
    display: flex;
  }
}
```

Which means that the current implementation didn't work in this case
either.

Fixes: #3623
2025-02-13 14:50:42 +00:00
..
2022-01-31 00:10:06 +01:00
2024-03-12 16:25:13 +01:00

@headlessui/react

A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.

Total Downloads Latest Release License

Installation

npm install @headlessui/react

Documentation

For full documentation, visit headlessui.dev.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Headless UI on GitHub

For casual chit-chat with others using the library:

Join the Tailwind CSS Discord Server