Skip to content

Itemscope : discrepancy between html-validate VisualStudio extension and common.js validation #420

@plissonneauf

Description

@plissonneauf
<head itemscope itemtype="http://smpte.org/standards/documents">
<!-- <head itemscope="itemscope" itemtype="http://smpte.org/standards/documents">  -->

causes common.js to complain about the itemscope not having an attribute:

export function validateHead(head, logger) {

  let metadata = {};

  if (head.getAttribute("itemscope") !== "itemscope")
    logger.error("head@itemscope is invalid");

whereas

<!-- <head itemscope itemtype="http://smpte.org/standards/documents">  -->
<head itemscope="itemscope" itemtype="http://smpte.org/standards/documents"> 

causes the html-validate extension to complain about itemscope having an attribute:
Attribute "itemscope" should omit value

Perhaps the check in common.js can be modified; in fact, itemscope is a boolean attribute that doesn't really need a value?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions