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

feat(svg-img-alt): rule for when svg needs a title #1953

Merged
merged 2 commits into from
Jan 10, 2020

Conversation

WilcoFiers
Copy link
Contributor

@WilcoFiers WilcoFiers commented Dec 19, 2019

This new svg-img-alt rule checks that the svg elements with role=graphics-document, and any element in the SVG namespace that has role=img or role=graphics-symbol has an accessible name, either through ARIA label, the title attribute or by having a non-empty child title element.

This rule limits the role-img-alt rule to elements in the HTML namespace to avoid overlap with the svg-img-alt rule.

Closes issue: #20

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@WilcoFiers WilcoFiers requested a review from a team as a code owner December 19, 2019 15:48
lib/checks/shared/svg-non-empty-title.js Outdated Show resolved Hide resolved
test/integration/rules/svg-img-alt/svg-img-alt.html Outdated Show resolved Hide resolved
lib/rules/role-img-alt.json Show resolved Hide resolved
@WilcoFiers WilcoFiers dismissed straker’s stale review December 20, 2019 10:23

Sorted, please take another look

Copy link
Contributor

@jeeyyy jeeyyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asides from the nitpick above. This looks good.

lib/checks/shared/svg-non-empty-title.js Show resolved Hide resolved
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.

3 participants