The W3 Validator gives an error when I use a search element inside a header element. But the spec page shows an example with the search element in the header element.
I tried to validate the example, but it also gives the same error.
<!doctype html>
<html lang=en>
<head>
<title>FOo</title>
</head>
<body>
<header>
<search>
<form action="search.php">
<label for="query">Find an article</label>
<input id="query" name="q" type="search">
<button type="submit">Go!</button>
</form>
</search>
</header>
</body>
</html>
Error: Element search not allowed as child of element header in this context. (Suppressing further errors from this subtree.) From line 8, column 13; to line 8, column 20 <search>↩ Contexts in which element search may be used: Where flow content is expected. Content model for element header: Flow content, but with no header or footer element descendants.
The error mentions search element can only be used where flow content is expected and that header element has flow content model. Why is this still invalid then?