diff --git a/core/modules/responsive_image/responsive_image.module b/core/modules/responsive_image/responsive_image.module
index f7e2192..8fb1171 100644
--- a/core/modules/responsive_image/responsive_image.module
+++ b/core/modules/responsive_image/responsive_image.module
@@ -76,6 +76,18 @@ function responsive_image_menu() {
  */
 function responsive_image_theme() {
   return array(
+    // HTML 4 and XHTML 1.0 always require an alt attribute. The HTML 5 draft
+    // allows the alt attribute to be omitted in some cases. Therefore,
+    // default the alt attribute to an empty string, but allow code calling
+    // theme('responsive_image') to pass explicit NULL for it to be omitted. Usually,
+    // neither omission nor an empty string satisfies accessibility
+    // requirements, so it is strongly encouraged for code calling
+    // theme('responsive_image') to pass a meaningful value for the alt variable.
+    // - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
+    // - http://www.w3.org/TR/xhtml1/dtds.html
+    // - http://dev.w3.org/html5/spec/Overview.html#alt
+    // The title attribute is optional in all cases, so it is omitted by
+    // default.
     'responsive_image' => array(
       'variables' => array(
         'style_name' => NULL,
@@ -109,6 +121,18 @@ function responsive_image_theme() {
  *   - image_style: An optional image style.
  *   - responsive_image_style_id: The ID of the responsive image style.
  *   - url: An optional \Drupal\Core\Url object.
+ *   - width: The width of the image (if known).
+ *   - height: The height of the image (if known).
+ *   - alt: The alternative text for text-based browsers. HTML 4 and XHTML 1.0
+ *     always require an alt attribute. The HTML 5 draft allows the alt
+ *     attribute to be omitted in some cases. Therefore, this variable defaults
+ *     to an empty string, but can be set to NULL for the attribute to be
+ *     omitted. Usually, neither omission nor an empty string satisfies
+ *     accessibility requirements, so it is strongly encouraged for code calling
+ *     theme('responsive_image') to pass a meaningful value for this variable.
+ *     - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
+ *     - http://www.w3.org/TR/xhtml1/dtds.html
+ *     - http://dev.w3.org/html5/spec/Overview.html#alt
  *
  * @ingroup themeable
  */
@@ -160,7 +184,16 @@ function theme_responsive_image_formatter($variables) {
  *     full URL.
  *   - width: The width 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. HTML 4 and XHTML 1.0
+ *     always require an alt attribute. The HTML 5 draft allows the alt
+ *     attribute to be omitted in some cases. Therefore, this variable defaults
+ *     to an empty string, but can be set to NULL for the attribute to be
+ *     omitted. Usually, neither omission nor an empty string satisfies
+ *     accessibility requirements, so it is strongly encouraged for code calling
+ *     theme('responsive_image') to pass a meaningful value for this variable.
+ *     - http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.8
+ *     - http://www.w3.org/TR/xhtml1/dtds.html
+ *     - http://dev.w3.org/html5/spec/Overview.html#a
  *   - title: The title text is displayed when the image is hovered in some
  *     popular browsers.
  *   - attributes: Associative array of attributes to be placed in the img tag.
@@ -204,7 +237,7 @@ function template_preprocess_responsive_image(&$variables) {
     ),
   );
   foreach (array('alt', 'title', 'attributes') as $key) {
-    if (isset($variables[$key])) {
+    if (isset($variables[$key]) || array_key_exists($key, $variables)) {
       $variables['img_element']["#$key"] = $variables[$key];
       unset($variables[$key]);
     }
diff --git a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
index 45a418d..41b7a7b 100644
--- a/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
+++ b/core/modules/responsive_image/src/Tests/ResponsiveImageFieldDisplayTest.php
@@ -173,15 +173,37 @@ protected function doTestResponsiveImageFieldFormatters($scheme, $empty_styles =
 
     // Test that the default formatter is being used.
     $image_uri = File::load($node->{$field_name}->target_id)->getFileUri();
-    $image = array(
+    $basic_image = array(
       '#theme' => 'image',
       '#uri' => $image_uri,
       '#width' => 360,
       '#height' => 240,
     );
+    $image = $basic_image;
     $default_output = str_replace("\n", NULL, drupal_render($image));
+    debug($default_output);
     $this->assertRaw($default_output, 'Default formatter displaying correctly on full node view.');
 
+
+    // Test with a NULL value for the alt option.
+    $image = $basic_image;
+    $image['#theme'] = 'image';
+    $image['#alt'] = NULL;
+    $rendered_image = render($image);
+    debug($rendered_image);
+    // Only testing the alt string, since the img tag can have width and height and different order.
+    $expected_result = 'alt=""';
+    $this->assertTrue(strpos($rendered_image, $expected_result) === FALSE, 'img element correctly renders with a NULL value for the alt option. (no alt)');
+
+    // Test without passing a value for the alt option.
+    $image = $basic_image;
+    $image['#theme'] = 'image';
+    $rendered_image = render($image);
+    debug($rendered_image);
+    // Only testing the alt string, since the img tag can have width and height and different order.
+    $expected_result = 'alt=""';
+    $this->assertTrue(strpos($rendered_image, $expected_result) !== FALSE, 'img element correctly renders the alt option (with empty value).');
+
     // Use the responsive image formatter linked to file formatter.
     $display_options = array(
       'type' => 'responsive_image',
