-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bug: Aria attributes for ContentEditable are ignored #6789
Comments
I think this is a regression in #6171 - the export type Props = {
editor: LexicalEditor;
ariaActiveDescendant?: React.AriaAttributes['aria-activedescendant'];
ariaAutoComplete?: React.AriaAttributes['aria-autocomplete'];
ariaControls?: React.AriaAttributes['aria-controls'];
ariaDescribedBy?: React.AriaAttributes['aria-describedby'];
ariaErrorMessage?: React.AriaAttributes['aria-errormessage'];
ariaExpanded?: React.AriaAttributes['aria-expanded'];
ariaInvalid?: React.AriaAttributes['aria-invalid'];
ariaLabel?: React.AriaAttributes['aria-label'];
ariaLabelledBy?: React.AriaAttributes['aria-labelledby'];
ariaMultiline?: React.AriaAttributes['aria-multiline'];
ariaOwns?: React.AriaAttributes['aria-owns'];
ariaRequired?: React.AriaAttributes['aria-required'];
autoCapitalize?: HTMLDivElement['autocapitalize'];
'data-testid'?: string | null | undefined;
} & Omit<React.AllHTMLAttributes<HTMLDivElement>, 'placeholder'>; |
Alternatively if these do need to be higher priority than explicit aria- attributes for some reason, they should not be set when undefined. I don't see why that should be the case and it would complicate the code to do it that way. |
hmm, so
will fix this? |
It should, the easiest way to find out is to try it |
ok. i am sorry but how? by using it in the a new react project? or testing it out in the lexical playground? |
Yes, any of those ways would work. You could also write a unit test for it. |
Alright, I will do that |
When adding aria-labelledby to the ContentEditable it is not visible in the dom.
<ContentEditable
className={'ContentEditable__root'}
aria-labelledby='TEST'
/>
The text was updated successfully, but these errors were encountered: