Commit 64cc711c authored by Sven Franck's avatar Sven Franck

app: W3C validator

parent 990c78fb
...@@ -365,8 +365,8 @@ ...@@ -365,8 +365,8 @@
text = "search"; text = "search";
} }
// disable IOS auto functionality (WARNING: fails W3C validation) // disable IOS auto functionality (WARNING: fails W3C validation)
spec.attributes.autocapitalize = "none"; //spec.attributes.autocapitalize = "none";
spec.attributes.autocorrect = "none"; //spec.attributes.autocorrect = "none";
container_class_list = "ui-input-" + text; container_class_list = "ui-input-" + text;
} }
...@@ -778,7 +778,8 @@ ...@@ -778,7 +778,8 @@
(collapsed ? " " : "ui-collapsible-heading-collapsed") (collapsed ? " " : "ui-collapsible-heading-collapsed")
}, },
"logic": { "logic": {
"role": spec.form ? "heading" : null //pfff (WARNING: fails W3C validation)
//"role": spec.form ? "heading" : null
} }
}); });
...@@ -907,7 +908,8 @@ ...@@ -907,7 +908,8 @@
"direct": {"className": "translate ui-title"}, "direct": {"className": "translate ui-title"},
"attributes": { "attributes": {
"data-i18n": config.title_i18n || "", "data-i18n": config.title_i18n || "",
"role": "heading", // WARNING Fails W3C
//"role": "heading",
"aria-level": "1" "aria-level": "1"
}, },
"logic": {"text": config.title || "\u00A0"} "logic": {"text": config.title || "\u00A0"}
...@@ -1028,8 +1030,9 @@ ...@@ -1028,8 +1030,9 @@
}); });
label = factory.element({ label = factory.element({
"type": "div", "type": "div",
"direct": {"className": "ui-controlgroup-label"}, "direct": {"className": "ui-controlgroup-label"}
"attributes": {"role": "heading"} //,
//"attributes": {"role": "heading"}
}); });
label.appendChild(factory.element({ label.appendChild(factory.element({
"type": "legend", "type": "legend",
...@@ -1903,9 +1906,6 @@ ...@@ -1903,9 +1906,6 @@
(config.form_item ? "ui-field-contain " : " ") + (config.form_item ? "ui-field-contain " : " ") +
(config.reveal ? "ui-screen-hidden " : " ") + (config.reveal ? "ui-screen-hidden " : " ") +
(element.class_list || "") (element.class_list || "")
},
"logic": {
"role": divider ? "heading" : null
} }
}); });
...@@ -3917,6 +3917,11 @@ ...@@ -3917,6 +3917,11 @@
}; };
} }
// NOTE: we can't remove type from attributes, but must delete
// it if it's null, otherwise code is not valid (Opera chokes)
if (pass.push.attributes.type === null) {
delete pass.push.attributes.type;
}
// need to set position here to also include custom fields // need to set position here to also include custom fields
pass.position = segment.position === "center" ? 1 : 2; pass.position = segment.position === "center" ? 1 : 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment