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

Trailing slash on void elements without unquoted attribute values #1509

Open
eps1lon opened this issue Dec 29, 2022 · 1 comment
Open

Trailing slash on void elements without unquoted attribute values #1509

eps1lon opened this issue Dec 29, 2022 · 1 comment

Comments

@eps1lon
Copy link

eps1lon commented Dec 29, 2022

Continuation of #1433

URL being validated or code to reproduce error:

<!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
</head>
<body>
<br />
</body>
</html>

The above code produces "Info: Trailing slash on void elements has no effect and interacts badly with unquoted attribute values."

However, the code in question does not have an unquoted attribute value so the message should not mention unquoted attribute values at all.

It's also questionable why "no effect" HTML should be flagged at all (even if it's just "info"). Flagging it produces unnecessary "issue-noise" in frameworks rendering HTML (e.g. facebook/react#25944). Maybe "info" should be hidden by default?

@frodo-m
Copy link

frodo-m commented Mar 29, 2023

I found this, https://html.spec.whatwg.org/multipage/syntax.html#start-tags:void-elements

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

No branches or pull requests

2 participants