hgroup is not deprecated.
As per today (2022-12-11) the hgroup
element is not deprecated and still part of the living standard.
https://html.spec.whatwg.org/multipage/dom.html#heading-content
There was some discussion in the whatwg group and a pull (merge) request that eventually got turned down. See discussion here: https://github.com/whatwg/html/pull/6462
This commit replaced the idea to deprecate hgroup: https://github.com/whatwg/html/commit/6682bdeee6fb08f5972bea92064fe250f1b4ec9c
Closes #6462 by updating hgroup's suggested usage instead of obsoleting it.
Reduced test-case
<!DOCTYPE html>
<html lang="en">
<head><title>hgroup is still valid</title></head>
<body><hgroup><h1>title</h1><p>tagline</p></hgroup></body>
</html>
Configuration
None used.
Output of html-validate --print-config hgroup.html
{
"plugins": [],
"rules": {
"area-alt": [
"error",
{
"accessible": true
}
],
"aria-hidden-body": "error",
"aria-label-misuse": "error",
"attr-case": "error",
"attr-delimiter": "error",
"attr-quotes": "error",
"attr-spacing": "error",
"attribute-allowed-values": "error",
"attribute-boolean-style": "error",
"attribute-empty-style": "error",
"attribute-misuse": "error",
"close-attr": "error",
"close-order": "error",
"deprecated": "error",
"deprecated-rule": "warn",
"doctype-html": "error",
"doctype-style": "error",
"element-case": "error",
"element-name": "error",
"element-permitted-content": "error",
"element-permitted-occurrences": "error",
"element-permitted-order": "error",
"element-permitted-parent": "error",
"element-required-ancestor": "error",
"element-required-attributes": "error",
"element-required-content": "error",
"empty-heading": "error",
"empty-title": "error",
"input-attributes": "error",
"long-title": "error",
"map-dup-name": "error",
"meta-refresh": "error",
"multiple-labeled-controls": "error",
"no-autoplay": [
"error",
{
"include": [
"audio",
"video"
]
}
],
"no-conditional-comment": "error",
"no-deprecated-attr": "error",
"no-dup-attr": "error",
"no-dup-class": "error",
"no-dup-id": "error",
"no-implicit-close": "error",
"no-inline-style": "error",
"no-multiple-main": "error",
"no-raw-characters": "error",
"no-redundant-for": "error",
"no-redundant-role": "error",
"no-self-closing": "error",
"no-trailing-whitespace": "error",
"no-utf8-bom": "error",
"prefer-button": "error",
"prefer-native-element": "error",
"prefer-tbody": "error",
"script-element": "error",
"script-type": "error",
"svg-focusable": "off",
"tel-non-breaking": "error",
"text-content": "error",
"unrecognized-char-ref": "error",
"valid-id": [
"error",
{
"relaxed": false
}
],
"void": "off",
"void-content": "error",
"void-style": "error",
"wcag/h30": "error",
"wcag/h32": "error",
"wcag/h36": "error",
"wcag/h37": "error",
"wcag/h63": "error",
"wcag/h67": "error",
"wcag/h71": "error"
},
"transform": {}
}
Expected result
The valid HTML example successfully passes html-validate checks and html-validate returns 0.
Actual result
Two errors occur. These are both invalid.
html-validate hgroup.html
/home/foobar/hgroup.html
1:88 error <hgroup> is deprecated deprecated
1:88 error <hgroup> element is not permitted as content under <body> element-permitted-content
✖ 2 problems (2 errors, 0 warnings)
More information:
https://html-validate.org/rules/deprecated.html
https://html-validate.org/rules/element-permitted-content.html
Version
-
html-validate
: html-validate-7.10.0