Skip to content

Commit

Permalink
media attribute in meta element
Browse files Browse the repository at this point in the history
  • Loading branch information
NiedziolkaMichal authored and sideshowbarker committed Oct 27, 2022
1 parent 58bea51 commit af3e94d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions schema/html5/meta.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ datatypes w = "http://whattf.org/datatype-draft"
& common.attrs.microdata.itemscope?
& common.attrs.microdata.itemtype?
& common.attrs.microdata.itemid?
& shared-hyperlink.attrs.media?
)
meta.name.attrs.name =
attribute name {
Expand Down
8 changes: 8 additions & 0 deletions src/nu/validator/checker/schematronequiv/Assertions.java
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,14 @@ else if ("bdo" == localName && atts.getIndex("", "dir") < 0) {
}
hasContentTypePragma = true;
}
if (atts.getIndex("", "media") > -1 &&
(atts.getIndex("", "name") <= -1
|| !atts.getValue("", "name").equalsIgnoreCase("theme-color"))) {
err("A \u201Cmeta\u201D element with a"
+ " \u201Cmedia\u201D attribute must have a"
+ " \u201Cname\u201D attribute that contains the"
+ " value \u201Ctheme-color\u201D.");
}
}
if ("link" == localName) {
boolean hasRel = false;
Expand Down

0 comments on commit af3e94d

Please sign in to comment.