diff --git a/src/rules/alt-require.js b/src/rules/alt-require.js index e0f6dd628..9804791c9 100644 --- a/src/rules/alt-require.js +++ b/src/rules/alt-require.js @@ -5,7 +5,7 @@ */ HTMLHint.addRule({ id: 'alt-require', - description: 'Alt of img must be present and alt of area[href] and input[type=image] must be set value.', + description: 'The alt attribute of an element must be present and alt attribute of area[href] and input[type=image] must have a value.', init: function(parser, reporter){ var self = this; parser.addListener('tagstart', function(event){ @@ -14,13 +14,13 @@ HTMLHint.addRule({ col = event.col + tagName.length + 1, selector; if(tagName === 'img' && !('alt' in mapAttrs)){ - reporter.warn('Alt of img tag must be present.', event.line, col, self, event.raw); + reporter.warn('An alt attribute must be present on elements.', event.line, col, self, event.raw); } else if((tagName === 'area' && 'href' in mapAttrs) || (tagName === 'input' && mapAttrs['type'] === 'image')){ if(!('alt' in mapAttrs) || mapAttrs['alt'] === ''){ selector = tagName === 'area' ? 'area[href]' : 'input[type=image]'; - reporter.warn('Alt of ' + selector + ' must be set value.', event.line, col, self, event.raw); + reporter.warn('The alt attribute of ' + selector + ' must have a value.', event.line, col, self, event.raw); } } }); diff --git a/src/rules/attr-lowercase.js b/src/rules/attr-lowercase.js index d0d07253d..30a3ecb28 100644 --- a/src/rules/attr-lowercase.js +++ b/src/rules/attr-lowercase.js @@ -4,7 +4,7 @@ */ HTMLHint.addRule({ id: 'attr-lowercase', - description: 'Attribute name must be lowercase.', + description: 'All attribute names must be in lowercase.', init: function(parser, reporter){ var self = this; parser.addListener('tagstart', function(event){ @@ -15,7 +15,7 @@ HTMLHint.addRule({ attr = attrs[i]; var attrName = attr.name; if(attrName !== attrName.toLowerCase()){ - reporter.error('Attribute name [ '+attrName+' ] must be lower case.', event.line, col + attr.index, self, attr.raw); + reporter.error('The attribute name of [ '+attrName+' ] must be in lowercase.', event.line, col + attr.index, self, attr.raw); } } }); diff --git a/src/rules/attr-no-duplication.js b/src/rules/attr-no-duplication.js index adbff8da6..60e1b7cf3 100644 --- a/src/rules/attr-no-duplication.js +++ b/src/rules/attr-no-duplication.js @@ -4,7 +4,7 @@ */ HTMLHint.addRule({ id: 'attr-no-duplication', - description: 'Attribute name can not been duplication.', + description: 'Elements cannot have duplicate attributes.', init: function(parser, reporter){ var self = this; parser.addListener('tagstart', function(event){ @@ -18,7 +18,7 @@ HTMLHint.addRule({ attr = attrs[i]; attrName = attr.name; if(mapAttrName[attrName] === true){ - reporter.error('The name of attribute [ '+attr.name+' ] been duplication.', event.line, col + attr.index, self, attr.raw); + reporter.error('Duplicate of attribute name [ '+attr.name+' ] was found.', event.line, col + attr.index, self, attr.raw); } mapAttrName[attrName] = true; } diff --git a/src/rules/attr-unsafe-chars.js b/src/rules/attr-unsafe-chars.js index cb7ede68f..5cb7d68ff 100644 --- a/src/rules/attr-unsafe-chars.js +++ b/src/rules/attr-unsafe-chars.js @@ -4,7 +4,7 @@ */ HTMLHint.addRule({ id: 'attr-unsafe-chars', - description: 'Attribute value cant not use unsafe chars.', + description: 'Attribute values cannot contain unsafe chars.', init: function(parser, reporter){ var self = this; parser.addListener('tagstart', function(event){ @@ -15,7 +15,7 @@ HTMLHint.addRule({ for(var i=0, l=attrs.length;i"', init: function(parser, reporter){ var self = this; function onComment(event){ if(event.long === false && event.content.toLowerCase() !== 'doctype html'){ - reporter.warn('Doctype must be html5.', event.line, event.col, self, event.raw); + reporter.warn('Invalid doctype. Use: ""', event.line, event.col, self, event.raw); } } function onTagStart(){ diff --git a/src/rules/head-script-disabled.js b/src/rules/head-script-disabled.js index a8cbe6282..f93d9e726 100644 --- a/src/rules/head-script-disabled.js +++ b/src/rules/head-script-disabled.js @@ -4,7 +4,7 @@ */ HTMLHint.addRule({ id: 'head-script-disabled', - description: 'The script tag can not be used in head.', + description: 'The