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

[Image + Teaser] Don't require ALT text if no asset selected #2523

Open
ky940819 opened this issue Jun 7, 2023 · 4 comments · May be fixed by #2607
Open

[Image + Teaser] Don't require ALT text if no asset selected #2523

ky940819 opened this issue Jun 7, 2023 · 4 comments · May be fixed by #2607

Comments

@ky940819
Copy link
Contributor

ky940819 commented Jun 7, 2023

Bug Report

Current Behavior
When editing an image component, if no image is provided, or the image component inherits the page image and no such image is configured, the dialog still requires an alt text to be specified. This encourages users to either add a blank/garbage alt text to allow the dialog to save, or to set the image as decorative - which may not be appropriate.

This may seem trivial in image components, because there is no good reason to add an image component without an image; however, the image dialog is also used in other components - such as the Teaser component - where an image is often not provided, which is an entirely valid use case for a teaser.

In this situation, the dialog is difficult to work with because the user should not have to play with alt text settings in a teaser with no image.

Expected behavior/code
The alt text should only be a required field if an image asset is configured.

Environment

  • AEM 6.5.17.0
  • Core Components version 2.23.0
  • JRE version 11
@tim-white-esri
Copy link

Related: Currently is "Image is decorative" is checked, Core Image still looks at the alt text field and flags an error if "Get alternative text from DAM" is checked and field is empty.

Expected behavior is that "Image is decorative" should take precedent over "Get alt from dam", that is after all why the option was chosen.
text from DAM

@ky940819
Copy link
Contributor Author

@tim-white-esri , i experience this as well.

IMO, the only time alt-text validation should be performed is when an image exists (regardless of where the image comes from) AND the "image is decorative" checkbox is unchecked.

@tim-white-esri
Copy link

Screen shot of Core Image v2 with Image is Decorative checked. Should NOT be an error for Metadata.
Error occurs because no alt was authored, and "Get alternative text from DAM" is checked but empty.

alt-error

ConnorJamesLow added a commit to ConnorJamesLow/aem-core-wcm-components that referenced this issue Oct 31, 2023
@ConnorJamesLow
Copy link

Looks like this is related to #2254

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