Skip to content

Conversation

@ConnorJamesLow
Copy link

Q                       A
Fixed Issues? Fixes #2523
Patch: Bug Fix?
Minor: New Feature?
Major: Breaking Change?
Tests Added + Pass? N/A
Documentation Provided ✅ Yes (code comments)
Any Dependency Changes? No
License Apache License, Version 2.0

Fix the image dialog validation logic per #2523.

  • Checking "Don't provide an alternative text" should prevent an error message from showing under alt when done editing.
  • Checking "Inherit from description of asset" should also prevent an error message.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ConnorJamesLow ConnorJamesLow changed the title Fix: [Image + Teaser] Don't require ALT text if no asset selected #2523 Suggested Fix: [Image + Teaser] Don't require ALT text if no asset selected #2523 Oct 31, 2023
// - alt is not inherited from the DAM
// - the alt value is empty.
// If all of these are true, return a validation error
if (!isDecorative && !isAltCheckboxChecked && !seededValue) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another check that could be beneficial:

// Do we have an asset at all?
var isImageSelected = !!$('[name="./fileReference"]').val(); 

if (isImageSelected && !isDecorative && !seededValue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant