Skip to content

Commit af3e94d

Browse files
NiedziolkaMichalsideshowbarker
authored andcommitted
media attribute in meta element
1 parent 58bea51 commit af3e94d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

schema/html5/meta.rnc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ datatypes w = "http://whattf.org/datatype-draft"
283283
& common.attrs.microdata.itemscope?
284284
& common.attrs.microdata.itemtype?
285285
& common.attrs.microdata.itemid?
286+
& shared-hyperlink.attrs.media?
286287
)
287288
meta.name.attrs.name =
288289
attribute name {

src/nu/validator/checker/schematronequiv/Assertions.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,6 +2986,14 @@ else if ("bdo" == localName && atts.getIndex("", "dir") < 0) {
29862986
}
29872987
hasContentTypePragma = true;
29882988
}
2989+
if (atts.getIndex("", "media") > -1 &&
2990+
(atts.getIndex("", "name") <= -1
2991+
|| !atts.getValue("", "name").equalsIgnoreCase("theme-color"))) {
2992+
err("A \u201Cmeta\u201D element with a"
2993+
+ " \u201Cmedia\u201D attribute must have a"
2994+
+ " \u201Cname\u201D attribute that contains the"
2995+
+ " value \u201Ctheme-color\u201D.");
2996+
}
29892997
}
29902998
if ("link" == localName) {
29912999
boolean hasRel = false;

0 commit comments

Comments
 (0)