False positive 'attribute-allowed-values' in case of uppercase enumerated html attributes.
Reduced test-case
test.html
<html lang="en">
<head>
<title>title</title>
</head>
<body>
<form method="POST">
<input type="text">
</form>
</body>
</html>
Configuration
.htmlvalidate.json
{
"extends": [
"html-validate:recommended"
],
"rules": {
"attribute-boolean-style": "off",
"attribute-allowed-values": "error",
"no-trailing-whitespace": "off",
"no-inline-style": "off",
"wcag/h30": "off",
"wcag/h32": "off",
"wcag/h36": "off",
"wcag/h37": "off",
"wcag/h67": "off",
"wcag/h71": "off"
}
}
Expected result
Based on this the validation completes without any error.
Actual result
html-validate test.html
reports error like below:
6:17 error Attribute "method" has invalid value "POST" attribute-allowed-values
✖ 1 problem (1 error, 0 warnings)
More information:
https://html-validate.org/rules/attribute-allowed-values.html
Version
-
html-validate
: 7.0.0
Workaround
Adding the lines below to .htmlvalidate.json to avoid errors in test case mentioned above.
{
...,
"elements": [
"html5",
{
"form": {
"attributes": {
"method": [ "get", "post", "GET", "POST" ]
}
}
}
]
}