S1SYPHOS / kirby-lingonberry

A Kirby port of the Wordpress theme 'Lingonberry'
https://twobrain.io/lingonberry
GNU General Public License v2.0
6 stars 2 forks source link

Alt attribute handling #10

Closed texnixe closed 6 years ago

texnixe commented 6 years ago
<img src="<?= $image->resize(766, null, 85)->url() ?>"<?php e($image->alt()->isNotEmpty(), ' alt="' . $image->alt()->html() . '"') ?>>

If the alt field is empty, the image will not have an alt attribute. However, the alt attribute should always be present even if empty for accessibility reasons.

S1SYPHOS commented 6 years ago

Thank you for letting me know.