adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
723 stars 737 forks source link

[Image V3] Unable to add an image without providing alternative text #2710

Open lochdown opened 3 months ago

lochdown commented 3 months ago

Bug Report

Current Behavior The mandatory "Alternative text for accessibility" text field is still showing as mandatory even if the "Don't provide an alternative text" checkbox is checked as there is an error message if this field is not filled out. This is forcing users to add alternative text, rendering the "Don't provide an alternative text" checkbox as useless.

Steps to replicate:

  1. Click the image component -> Click the configure (wrench icon) button
  2. Check the "Don't provide an alternative text" checkbox
  3. Click Done
  4. Uncheck the "Don't provide an alternative text" checkbox
  5. The "Error: Please fill out this field." message will appear
ImageDefect

Expected behavior/code When the "Don't provide an alternative text" checkbox is checked, the "Alternative text for accessibility" text field should be optional, allowing the user to submit their image without Alternative text.

Environment

Possible Solution Alter the image javascript to make the "Alternative text for accessibility" text field not required when the Don't provide an alternative text" checkbox is checked.