Skip to content

Instantly share code, notes, and snippets.

@peteboere
Last active April 13, 2018 13:03
Show Gist options
  • Save peteboere/7560963 to your computer and use it in GitHub Desktop.
Save peteboere/7560963 to your computer and use it in GitHub Desktop.
Drupal theme overrides for better accessibility
<?php
/*
theme_image() override.
*/
function THEME_image($vars)
{
// [Accessibility] Images must always have an alt attribute.
if (! isset($vars['alt'])) {
$vars['alt'] = '';
}
return theme_image($vars);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment