aem-core-wcm-components
aem-core-wcm-components copied to clipboard
[Image, Teaser] Validation inconsistencies in dialog Asset tab
Bug Report
Current Behavior With image v3 and teaser v2, I've come up with some inconsistencies during dialog input validation. These are my test cases:
- [Image, Teaser] Set up linked page with featured image (or a featured image in current page) but no alternative text is set in the linked page page properties: then setting the alternative text in the corresponding input of the Asset tab of the dialog, does not validate.
- [Image] Check input "Don't provide an alternative text" in the Asset tab of the dialog: then the Link input is not visible.
Expected behavior/code For each test case:
- Allow an alternative text to be manually defined by the user
- Enable the Link input field even if alternative text is not provided
Environment
- AEM version and patch level: 2022.6.7904.20220629T070041Z
- Core Components version: 2.20.4
- JRE version: OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
We need to fix test case 1. I don't think we should provide the link capability for images without alt text for accessibility reasons.
And lack of alt text hurts page experience: engines track UX accessibility metrics. https://www.searchenginejournal.com/google-alt-text-only-a-factor-for-image-search/442865/
We are experiencing similar problems with the teaser and image components. Steps to reproduce:
- Put an image component on a page.
- Open the author dialog of the image component.
- Deselect the checkbox "Inherit featured image from page".
- Drag an image file from the sidebar in the author dialog.
- (leave checkbox "Inherit from description of asset" selected)
- Select the checkbox "Don’t provide an alternative text".
- Try to save the image component (click on "Done") --> It is not possible and the tab asset is marked as incorrect.
The same will happen when trying to save a teaser with an image and both checkboxes selected.
I would expect that if "Don’t provide an alternative text" is selected, it doesn't matter whether "Inherit from description of asset" is selected or not.