Summary
In React 18, passing aria-disabled={true} to a custom element serialized that value as "true". That seemed good and as far as I can tell worked as expected.
In React 19, that same code adds the aria-disabled attribute, but doesn't set it to anything. That doesn't work as well. It appears to me (although I'm not certain) that it breaks accessibility for these custom elements. It definitely breaks @testing-library/jest-dom's toBeChecked matcher with aria-checked (https://github.com/testing-library/jest-dom/blob/918b6fbcde10d4409ee8f05c6e4eecbe96a72b7a/src/to-be-checked.js#L31).
For these aria attributes that require strings instead of booleans to function properly, is this an intended change?
Summary
In React 18, passing
aria-disabled={true}to a custom element serialized that value as "true". That seemed good and as far as I can tell worked as expected.In React 19, that same code adds the
aria-disabledattribute, but doesn't set it to anything. That doesn't work as well. It appears to me (although I'm not certain) that it breaks accessibility for these custom elements. It definitely breaks@testing-library/jest-dom'stoBeCheckedmatcher witharia-checked(https://github.com/testing-library/jest-dom/blob/918b6fbcde10d4409ee8f05c6e4eecbe96a72b7a/src/to-be-checked.js#L31).For these aria attributes that require strings instead of booleans to function properly, is this an intended change?