Ismael, I don’t mean to be rude, but we’ve already discussed (above) that adding a space is not an option. For accessibility, having a blank alt attribute is just as bad as having an improper one like “Image”.
I was able to work with AI to get a temporary fix, which I’ll include below:
// Override the fallback alt text to be an identifiable marker
add_filter( 'cs_fallback_alt_text', function() {
return '[[CS_EMPTY_ALT]]'; // marker to bypass default "Image" fallback
});
// On the frontend only, replace the marker or missing alt with alt=""
if ( ! is_admin() ) {
add_filter( 'cs_apply_image_atts', function( $atts ) {
if ( ! isset( $atts['alt'] ) || $atts['alt'] === '[[CS_EMPTY_ALT]]' ) {
$atts['alt'] = '';
}
return $atts;
});
}
This ensures that when the alt
field is left blank in the builder, the output becomes alt=""
on the front end — as required by WCAG, WAVE, and EAA for decorative images.
The fallback string “Image” (or even a space) is misleading to assistive tech (such as screen readers) and doesn’t meet compliance.
This solution I’m providing bypasses the internal fallback mechanism with a unique marker ([[CS_EMPTY_ALT]]
), then swaps it out just before rendering.
It’s lightweight, doesn’t affect the builder, and keeps everything compliant until an official fix can be implemented.
Please consider adding this to the list of known issues — it’s an important fix for those of us working toward full accessibility compliance. While this workaround does the job for now, an official solution would help ensure all users, regardless of technical ability, can deliver WCAG-compliant content out of the box.