Issue #2211831 by mdrummond, jayeshanandani: Removal of alt attribute from [picture] tag.

8.0.x
webchick 2014-03-16 12:00:22 -07:00
parent 682c55045b
commit be6f7a25b3
1 changed files with 3 additions and 7 deletions

View File

@ -200,6 +200,8 @@ function theme_responsive_image_formatter($variables) {
* - width: The width of the image (if known).
* - height: The height of the image (if known).
* - alt: The alternative text for text-based browsers.
* - title: The title text is displayed when the image is hovered in some
* popular browsers.
* - breakpoints: An array containing breakpoints.
*
* @ingroup themeable
@ -262,13 +264,7 @@ function theme_responsive_image($variables) {
}
if (!empty($sources)) {
$attributes = array();
foreach (array('alt', 'title') as $key) {
if (isset($variables[$key])) {
$attributes[$key] = $variables[$key];
}
}
$output[] = '<picture' . new Attribute($attributes) . '>';
$output[] = '<picture>';
// Add source tags to the output.
foreach ($sources as $source) {