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 attributes for ContentEditable are ignored #6814

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

vantage-ola
Copy link
Contributor

Description

Fix Aria attributes for ContentEditable element

Closes #6789

Test plan

Before

When adding aria-labelledby to the ContentEditable it is not visible in the dom.

<ContentEditable
className={'ContentEditable__root'}
aria-labelledby='TEST'
/>

After

The aria-labelledby is visible in the the dom. you can check it out by inspecting element in browser DevTools to verify the ARIA attributes...

TODO

Write a unit test to verify the attributes are properly rendered in the DOM

Copy link

vercel bot commented Nov 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:12pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 11, 2024 11:12pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 10, 2024
Copy link

github-actions bot commented Nov 10, 2024

size-limit report 📦

Path Size
lexical - cjs 29.94 KB (0%)
lexical - esm 29.75 KB (0%)
@lexical/rich-text - cjs 38.56 KB (0%)
@lexical/rich-text - esm 31.64 KB (0%)
@lexical/plain-text - cjs 37.18 KB (0%)
@lexical/plain-text - esm 28.95 KB (0%)
@lexical/react - cjs 40.35 KB (0%)
@lexical/react - esm 33.07 KB (0%)

@vantage-ola
Copy link
Contributor Author

I dont know if the tests are necessary... but while writing the tests, If i wanted to write test cases where the isEditable is false, but I couldnt figure it out how to get it to work...

@etrepum etrepum added this pull request to the merge queue Nov 12, 2024
Merged via the queue into facebook:main with commit 3acfed5 Nov 12, 2024
40 checks passed
@vantage-ola vantage-ola deleted the fix-aria-content-editable branch November 14, 2024 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Aria attributes for ContentEditable are ignored
3 participants