Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • H html-validate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

GitLab 15.0 has launched! Please visit Breaking changes in 15.0 and 15.0 Removals to see which breaking changes may impact your workflow.

  • html-validate
  • html-validate
  • Issues
  • #104
Closed
Open
Created Feb 04, 2021 by Steffen Rademacker@webgefrickel

False positive when validating <video> with <source> wrapped in <div>

When validating a <video>-Tag with <source>-Definitions nested inside a <div> I get an error that should not occur.

Reduced test-case

<!doctype html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title>Video</title>
  </head>
  <body>

    <div class="video">
      <video class="video__element" poster="//localhost/__mock/video-landscape.jpg">
        <source src="//localhost/__mock/video-landscape.mp4" type="video/mp4">
      </video>
    </div>

  </body>
</html>

Configuration

No configuration file whatsoever, fails 'out-of-the-box'.

Expected result

Everything validates correctly.

Actual result

When validating the video.html-file on the command line (see above), I get the following result:

❯ npx html-validate video.html

video.html
  11:10  error  Element <source> is not permitted as content in <div>  element-permitted-content

✖ 1 problem (1 error, 0 warnings)
npm ERR! code 1
...

Version

  • html-validate: 4.4.0
Edited Feb 04, 2021 by Steffen Rademacker
Assignee
Assign to
Time tracking