Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support checking alt attribute of area[href] and input[type=image] #38

Merged
merged 6 commits into from
Jul 30, 2014
Merged

Add support checking alt attribute of area[href] and input[type=image] #38

merged 6 commits into from
Jul 30, 2014

Conversation

takenspc
Copy link
Contributor

Area and input elements require alt attribute in some condition likewise alt attribute of img element.

This rule check whether area and input element have non empty alt attribute.
http://www.w3.org/TR/html5/embedded-content-0.html#attr-area-alt
http://www.w3.org/TR/html5/forms.html#attr-input-alt

@yaniswang
Copy link
Contributor

Two point:

  1. Please use: var mapAttrs = parser.getMapAttrs(event.attrs) https://github.com/yaniswang/HTMLHint/blob/master/src/rules/jshint.js#L13
  2. Include img tag is better? Discard the img-alt-require rule.

@takenspc
Copy link
Contributor Author

Thanks for your review!

  • Changed to use getMapAttrs.
  • Add support alt of img
  • Fixed some typos and coding style nits

yaniswang added a commit that referenced this pull request Jul 30, 2014
@yaniswang yaniswang merged commit cc28547 into htmlhint:master Jul 30, 2014
@takenspc
Copy link
Contributor Author

Thank you for your merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants