Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • H html-validate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 38
    • Issues 38
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
    • Model experiments
  • 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
  • html-validate
  • html-validate
  • Issues
  • #154
Closed
Open
Issue created May 20, 2022 by József Horváth@dministro

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" ]
        }
      }
    }
  ]
}
Assignee
Assign to
Time tracking