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

accessibility rules - check for missing alt attributes #69

Closed
ckundo opened this issue Mar 13, 2015 · 4 comments
Closed

accessibility rules - check for missing alt attributes #69

ckundo opened this issue Mar 13, 2015 · 4 comments

Comments

@ckundo
Copy link

ckundo commented Mar 13, 2015

Have you considered adding some basic accessibility assertions to your rules (i.e. presence of alt attributes, label association on form elements)?

I'd like to work on some PRs for accessibility rules, starting with looking for missing alt attributes. Would you be open to that?

@sds
Copy link
Owner

sds commented Mar 13, 2015

Hey @ckundo,

Thanks for suggesting ways to improve haml-lint. We we would be open to accepting pull requests for some accessibility-related lints. However, depending on how noisy those lints are we may end up disabling them by default so they are opt-in.

The concern here is that HAML may not be the right place to do this kind of enforcement. There are some uses of HAML which the intended consumer is not a user-facing website, so such lints would not be useful.

I'm curious to see what you are proposing. Ideally, any linters would be backed by a relevant RFC or W3C standard of some sort, and not just be some "best practice."

Depending on the scope of these linters we might also end up namespacing them so they can be enabled/disabled wholesale with something like:

linters:
  Accessibility::*:
    enabled: true

Interested in seeing what you have to propose.

ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 13, 2015
- Introduces a new method to check if an attribute exists in a tag nodes hash
  attributes
- Required for followup commit to check for missing alt attributes

[sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 13, 2015
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 13, 2015
- Per comment by @sds, users must explicitly enable accessibility rules.

[Finishes sds#69]
@ckundo
Copy link
Author

ckundo commented Mar 13, 2015

Hey @sds, I submitted a PR, I welcome your review and feedback. Thanks!

ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
- Introduces a new method to check if an attribute exists in a tag nodes hash
  attributes
- Required for followup commit to check for missing alt attributes

[sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
- Per comment by @sds, users must explicitly enable accessibility rules.

[Finishes sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
- Introduces a new method to check if an attribute exists in a tag nodes hash
  attributes
- Required for followup commit to check for missing alt attributes

[sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 15, 2015
- Per comment by @sds, users must explicitly enable accessibility rules.

[Finishes sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 16, 2015
- Introduces a new method to check if an attribute exists in a tag nodes hash
  attributes
- Required for followup commit to check for missing alt attributes

[sds#69]
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 16, 2015
ckundo pushed a commit to ckundo/haml-lint that referenced this issue Mar 16, 2015
- Per comment by @sds, users must explicitly enable accessibility rules.

[Finishes sds#69]
sds pushed a commit that referenced this issue Mar 28, 2015
- alternative text is required for non text content
- http://www.w3.org/TR/2008/REC-WCAG20-20081211/#text-equiv-all

Finishes #69

Change-Id: I1e13fc15524a4a42151972cd55ef1de4826da2ec
Reviewed-on: http://gerrit.causes.com/48346
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Tested-by: Shane da Silva <shane.dasilva@brigade.com>
@sds
Copy link
Owner

sds commented Mar 28, 2015

Implemented by #70. Thanks!

@sds sds closed this as completed Mar 28, 2015
@ckundo
Copy link
Author

ckundo commented Mar 28, 2015

Awesome, thanks @sds!

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

Successfully merging a pull request may close this issue.

2 participants