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

no-aria-label should ignore decorative SVG with aria-hidden=true (bis) #473

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

PhilippeVay
Copy link
Contributor

#472 but better...

Closes #387

An SVG with aria-hidden=true is decorative, no need to check for aria-label or aria-labelledby.

Done:

  1. in errors.scss rule no-aria-label, adding :not([aria-hidden=true]) to each selector
  2. re-build CSS files
  3. update documentation

Proposed new description is:

[role=img] without [aria-hidden=true] should either have [aria-label] or [aria-labelledby].
If image is decorative, please use [role=presentation] instead.

@netlify
Copy link

netlify bot commented Aug 1, 2023

Deploy Preview for a11ycss ready!

Name Link
🔨 Latest commit b8175fd
🔍 Latest deploy log https://app.netlify.com/sites/a11ycss/deploys/64c92c1bfae69e0008fa738d
😎 Deploy Preview https://deploy-preview-473--a11ycss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ffoodd
Copy link
Owner

ffoodd commented Aug 8, 2023

Thanks for this, this is nicely done! ❤️

I'm going with it, but as a sidenote for future reader: you're not supposed to use role="img" on a decorative SVG. Either use aria-hiden="true" or role="presentation".

@ffoodd ffoodd merged commit 815cd31 into ffoodd:main Aug 8, 2023
12 checks passed
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.

[question] inline svg with role="img" and aria-hidden
2 participants