API reference
HTML Issues
An HTML issue corresponds to an issue found on a given web page when being checked by the HTML validator.
Attributes
- ID
- Unique ID for this HTML issue.
- Issue Type
- Error or Warning
- Issue Sub Type
- Optional, provides additional info on the type of the issue.
- Message
- Brief description of the issue.
- HTML
- Code snippets showing the affected elements, each one including an extract and its coordinates.
- Tags
- Comma-separated list of tags to categorize this issue.
- Inserted At
- Timestamp when the HTML Issue was created.
- Updated At
- Timestamp when the HTML Issue was last updated.
- Description
- Short plain-text explanation of the issue, from the Rocket Validator guide that matches it. Null when no guide matches.
- Description Markdown
- The same explanation in Markdown. Null when no guide matches.
- Description HTML
- The same explanation as rendered HTML. Null when no guide matches.
- Guide URL
- Link to the full guide for this issue. Null when no guide matches.
Guide descriptions are not available for every issue
Rocket Validator publishes a guide for the most common issues, but not for every possible validator message. When no guide matches an issue, the four description and guide attributes are
null. Treat them as optional.
Relationships
- Report
- The Report that this HTML Issue belongs to.
- Web Page
- The Web Page that this HTML Issue belongs to.
Example
Example: HTML Issue
{"data": {"attributes": {"description": "Each HTML element must have unique attribute names \u2014 no attribute can appear more than once on the same element.","description_markdown": "Each HTML element must have unique attribute names \u2014 no attribute can appear more than once on the same element.","description_html": "<p>Each HTML element must have unique attribute names \u2014 no attribute can appear more than once on the same element.</p>","guide_url": "https://rocketvalidator.com/html-validation/duplicate-attribute-x","how_many": 3,"html": [{"coordinates": {"first_column": null,"first_line": 210,"hilite_length": 1,"hilite_start": 15,"last_column": 22,"last_line": 210},"extract": "=\"game-news\" id=\"game-news\" >G"},{"coordinates": {"first_column": null,"first_line": 211,"hilite_length": 1,"hilite_start": 15,"last_column": 117,"last_line": 211},"extract": "f0%9f%8d%93\" id=\"madelines-bac"},{"coordinates": {"first_column": null,"first_line": 261,"hilite_length": 1,"hilite_start": 15,"last_column": 48,"last_line": 261},"extract": "f0%9f%92%a8\" id=\"driftmania-%f"}],"tags": ["duplicate attribute"],"inserted_at": "2024-03-05T12:44:34","issue_sub_type": null,"issue_type": "error","message": "Duplicate attribute \u201cid\u201d.","updated_at": "2024-03-05T12:44:34"},"id": "144375908","relationships": {"report": {"links": {"related": "https://rocketvalidator.com/api/v1/reports/72eecced-8472-41fc-b194-59b7496c7576"}},"web_page": {"links": {"related": "https://rocketvalidator.com/api/v1/reports/72eecced-8472-41fc-b194-59b7496c7576/web_pages/8413311"}}},"type": "html_issue"},"jsonapi": {"version": "1.0"}}List HTML issues on a web page
To list the HTML issues found on a web page, send a
GETrequest to/api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues.Example: list the HTML issues found on a web page
GET /api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issuesFiltering by message
To include only the HTML issues of a given kind, use the
filter[message]option.Example: filter HTML issues for a web page about "table"
GET /api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues?filter[message]=tableFiltering by tag
To include only the issues for a given
tagscombination, use thefilter[tags]options:
filter[tags][mode]setting the tag combination mode, which can beany,allornone.filter[tags][list]including a comma-separated list of tags.Example: filter HTML issues for a web page tagged with "label"
GET /api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues?filter[tags][mode]=any&filter[tags][list]=labelRetrieve an HTML issue
To show an individual HTML issue on a web page, send a
GETrequest to/api/v1/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/html_issues/$HTML_ISSUE_IDExample: retrieve HTML issue for a web page
GET `/api/v1/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/html_issues/$HTML_ISSUE_ID