Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • html-validate
  • html-validate
  • Issues
  • #193

'empty-heading' false positive if within `hidden` div

The <h3> element is reported to be empty even though it's not. This seems to happen because of the <div> element with the hidden attribute.

Reduced test-case

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Test</title>
    </head>
    <body>
        <div hidden>
            <h3>Not Empty</h3>
        </div>
    </body>
</html>

Configuration

empty config

Expected result

The 'empty-heading' rule should not report the <h3> element to be empty.

Actual result

The 'empty-heading' rule reports "'<h3> cannot be empty, must have text content'"

Version

7.9.0

Edited Nov 16, 2022 by janschoenherr
Assignee
Assign to
Time tracking