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

[5.x]: hasAlt sticks on "true" even when an asset removes its alt text #15762

Open
andrewfairlie opened this issue Sep 19, 2024 · 0 comments
Open
Labels

Comments

@andrewfairlie
Copy link

andrewfairlie commented Sep 19, 2024

What happened?

Description

When you upload an image to Assets, it is hasAlt as false by default. When you add text, it goes to true, but removing the text doesn't go back to false

Steps to reproduce

  1. Upload an empty image
  2. Observe value of hasAlt
  3. Add some text to alt
  4. Observe value of hasAlt
  5. Remove all of the text
  6. Observe value of hasAlt

Expected behavior

  1. Upload an empty image
  2. Observe that hasAlt is false
  3. Add some text to alt
  4. Observe that hasAlt is true
  5. Remove all of the text
  6. Observe hasAlt is false

Actual behavior

  1. Upload an empty image
  2. Observe that hasAlt is false
  3. Add some text to alt
  4. Observe that hasAlt is true
  5. Remove all of the text
  6. Observe hasAlt is still true

Craft CMS version

5.4.4

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

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

1 participant