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

A11y: element should have child content with bind:textContent #5020

Closed
Glench opened this issue Jun 15, 2020 · 3 comments
Closed

A11y: element should have child content with bind:textContent #5020

Glench opened this issue Jun 15, 2020 · 3 comments
Labels

Comments

@Glench
Copy link

Glench commented Jun 15, 2020

Describe the bug
An A11y warning "element should have child content" is shown when an element has contenteditable="true" and bind:textContent={someVariable}.

To Reproduce
View the warning on this repl: https://svelte.dev/repl/26de97d4e85b4f30bd44f8859eacab8a?version=3.23.2

Expected behavior
There should be no warning since the element has content bound. I haven't tested with other parameters to see if the warning goes away.

Severity
Super low, but it helps not to get unneeded warnings in compilation. I'm hoping it's a super easy fix :)

Thanks so much for Svelte! I've been using it in a bunch of projects and I'm really loving it.

@Conduitry Conduitry added the bug label Jun 15, 2020
@Conduitry
Copy link
Member

Yeah it probably makes sense for the Element#validate_content() method to ignore the element if it has a bind:textContent or bind:innerHTML.

@Glench
Copy link
Author

Glench commented Jun 16, 2020

Thanks for the ultrafast fix. Love this project

@Conduitry
Copy link
Member

This warning is no longer shown in 3.24.0 - https://svelte.dev/repl/26de97d4e85b4f30bd44f8859eacab8a?version=3.24.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants