Issue #2211831 by mdrummond, jayeshanandani: Removal of alt attribute from [picture] tag.
parent
682c55045b
commit
be6f7a25b3
|
@ -200,6 +200,8 @@ function theme_responsive_image_formatter($variables) {
|
||||||
* - width: The width of the image (if known).
|
* - width: The width of the image (if known).
|
||||||
* - height: The height of the image (if known).
|
* - height: The height of the image (if known).
|
||||||
* - alt: The alternative text for text-based browsers.
|
* - 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.
|
* - breakpoints: An array containing breakpoints.
|
||||||
*
|
*
|
||||||
* @ingroup themeable
|
* @ingroup themeable
|
||||||
|
@ -262,13 +264,7 @@ function theme_responsive_image($variables) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($sources)) {
|
if (!empty($sources)) {
|
||||||
$attributes = array();
|
$output[] = '<picture>';
|
||||||
foreach (array('alt', 'title') as $key) {
|
|
||||||
if (isset($variables[$key])) {
|
|
||||||
$attributes[$key] = $variables[$key];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$output[] = '<picture' . new Attribute($attributes) . '>';
|
|
||||||
|
|
||||||
// Add source tags to the output.
|
// Add source tags to the output.
|
||||||
foreach ($sources as $source) {
|
foreach ($sources as $source) {
|
||||||
|
|
Loading…
Reference in New Issue