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

Empty content warnings #23

Open
mthuurne opened this issue Jan 29, 2020 · 0 comments
Open

Empty content warnings #23

mthuurne opened this issue Jan 29, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mthuurne
Copy link
Member

We had an issue that APE didn't detect where a page was valid HTML but had no content. Specifically, it had an empty (whitespace only) <main> tag. It may be useful to have an optional warning when certain tags have no content, if that is highly unlikely to be what the user intended.

There are probably other tags that are unlikely to have no content, like <body> and <nav>. But also smaller-scope tags: for example <b></b> is also suspect. Maybe it's even safe to say that most non-void elements that are empty are suspect? Although that runs the risk of false positives when an element is going to be populated by JavaScript.

The trade-off between false positives and false negatives could be handled by making this feature configurable, so the user can include and/or exclude tags.

I think this should be implemented as a plugin, since it's not a core feature.

@mthuurne mthuurne added the enhancement New feature or request label Jan 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant