API V2 reference (beta)
W3C Validator Issues
A W3C Validator issue corresponds to an issue found on a given web page when being checked by the W3C Validator.
Attributes
- ID
- Unique ID for this W3C Validator 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
- List of tags to categorize this issue.
- Inserted At
- Timestamp when the W3C Validator Issue was created.
- Updated At
- Timestamp when the W3C Validator 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 W3C Validator Issue belongs to.
- Web Page
- The Web Page that this W3C Validator Issue belongs to.
Example
Example: W3C Validator 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/v2/reports/72eecced-8472-41fc-b194-59b7496c7576"}},"web_page": {"links": {"related": "https://rocketvalidator.com/api/v2/reports/72eecced-8472-41fc-b194-59b7496c7576/web_pages/8413311"}}},"type": "w3c_validator_issue"},"jsonapi": {"version": "1.0"}}List W3C Validator issues on a web page
To list the W3C Validator issues found on a web page, send a
GETrequest to/api/v2/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/w3c_validator_issues.Example: list the W3C Validator issues found on a web page
GET /api/v2/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/w3c_validator_issuesFiltering by message
To include only the W3C Validator issues of a given kind, use the
filter[message]option.Example: filter W3C Validator issues for a web page about "table"
GET /api/v2/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/w3c_validator_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 W3C Validator issues for a web page tagged with "label"
GET /api/v2/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/w3c_validator_issues?filter[tags][mode]=any&filter[tags][list]=labelRetrieve a W3C Validator issue
To show an individual W3C Validator issue on a web page, send a
GETrequest to/api/v2/reports/$REPORT_ID/web_pages/$WEB_PAGE_ID/w3c_validator_issues/$W3C_VALIDATOR_ISSUE_IDExample: retrieve W3C Validator issue for a web page
GET /api/v2/reports/$REPORT_ID/web_pages/$WEBPAGE_ID/w3c_validator_issues/$W3C_VALIDATOR_ISSUE_ID