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

WCAG: Empty alt attributes should be allowed on img tags #411

Closed
niektenhoopen opened this issue Oct 15, 2024 · 2 comments
Closed

WCAG: Empty alt attributes should be allowed on img tags #411

niektenhoopen opened this issue Oct 15, 2024 · 2 comments
Labels

Comments

@niektenhoopen
Copy link
Contributor

Describe the bug

Screen readers announce the filename of decorative images if the alt tag is not present. The plug-in should allow empty alt tags.

https://www.w3.org/WAI/tutorials/images/decorative/#:~:text=Leaving%20out%20the%20alt%20attribute,the%20image%20on%20the%20page.

To reproduce

Expected behaviour

There should be an alt="" on images if it's specified as empty

Versions

  • Plugin version:
  • Craft version:
@khalwat
Copy link
Contributor

khalwat commented Oct 16, 2024

Thanks, I'll have a look!

@khalwat
Copy link
Contributor

khalwat commented Oct 19, 2024

Implemented via your PR, which I modified a bit and backported to the Craft 3 version.

Craft CMS 3:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-imageoptimize": "dev-develop as 1.6.56”,

Then do a composer clear-cache && composer update

…..

Craft CMS 4:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-imageoptimize": "dev-develop-v4 as 4.0.10”,

Then do a composer clear-cache && composer update

…..

Craft CMS 5:

You can try it now by setting your semver in your composer.json to look like this:

    "nystudio107/craft-imageoptimize": "dev-develop-v5 as 5.0.3”,

Then do a composer clear-cache && composer update

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

No branches or pull requests

2 participants