NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 695 - <video></video> should be valid
<video></video> should be valid
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Michael[tm] Smith
data:text/html;charset=utf-8;base64,P...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-22 20:20 CET by Ms2ger
Modified: 2011-08-03 07:17 CEST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ms2ger 2009-12-22 20:20:30 CET
<!DOCTYPE html>
<title>Video test</title>
<video></video>

Expected: This should be an error. 

Actual result: "The document validates according to the specified schema(s)."

Spec text: "Content model: If the element does not have a src attribute: one or more source elements, then, transparent, but with no media element descendants."

The same bug is present for the audio element.
Comment 1 Michael[tm] Smith 2010-12-23 11:16:36 CET
In my workspace and at http://www.w3.org/html/check (which is running my workspace code), <video></video> causes the following error to be emitted as expected.

Error: Element video is missing a required instance of child element source. And similarly for the audio case.

I thought that I had already pushed all the relevant code to the main repo prior to the latest deployment of http://validator.nu but I guess I didn't. So I will re-check this again after the next time it does get redeployed.
Comment 2 Philip Jägenstedt 2011-07-31 00:16:25 CEST
The example now gives "Element video is missing a required instance of child element source." so this has been fixed.
Comment 3 Henri Sivonen 2011-08-02 09:29:20 CEST
WFM.
Comment 4 Simon Pieters 2011-08-02 09:38:48 CEST
The spec has however changed since.

"If the element does not have a src attribute: **zero or more** source elements, then zero or more track elements, then transparent, but with no media element descendants."
Comment 5 Philip Jägenstedt 2011-08-02 10:32:21 CEST
Isn't that a spec bug?
Comment 6 Simon Pieters 2011-08-02 13:17:27 CEST
No, it was changed when getUserMedia was added. You don't have a src until the user has chosen a camera, but you still want a video placeholder.
Comment 7 Philip Jägenstedt 2011-08-02 13:23:53 CEST
Excellent, that will make my code where I use <video></video> and set the src by script later valid!