diff --git a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkFormatter.php
index 37df049..bd67402 100644
--- a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkFormatter.php
+++ b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkFormatter.php
@@ -147,6 +147,12 @@ public function viewElements(FieldItemListInterface $items) {
         $element[$delta] = array(
           '#markup' => String::checkPlain($link_title),
         );
+
+        if (!empty($item->_attributes)) {
+          // Take the fallback behavior of ___ by just setting the
+          // _attributes directly.
+          $item->_attributes += array('content' => $item->url);
+        }
       }
       else {
         $element[$delta] = array(
@@ -154,6 +160,7 @@ public function viewElements(FieldItemListInterface $items) {
           '#title' => $link_title,
           '#options' => $url->getOptions(),
         );
+
         if ($url->isExternal()) {
           $element[$delta]['#href'] = $url->getPath();
         }
@@ -161,6 +168,14 @@ public function viewElements(FieldItemListInterface $items) {
           $element[$delta]['#route_name'] = $url->getRouteName();
           $element[$delta]['#route_parameters'] = $url->getRouteParameters();
         }
+
+        if (!empty($item->_attributes)) {
+          $element[$delta]['#options'] += array ('attributes' => array());
+          $element[$delta]['#options']['attributes'] += $item->_attributes;
+          // Unset field item attributes since they have been included in the
+          // formatter output and should not be rendered in the field template.
+          unset($item->_attributes);
+        }
       }
     }
 
diff --git a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkSeparateFormatter.php b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkSeparateFormatter.php
index 7a427e5..a90d8b4 100644
--- a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkSeparateFormatter.php
+++ b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldFormatter/LinkSeparateFormatter.php
@@ -77,6 +77,14 @@ public function viewElements(FieldItemListInterface $items) {
         '#url_title' => $url_title,
         '#url' => $url,
       );
+
+      if (!empty($item->_attributes)) {
+        $element[$delta]['#options'] += array('attributes' => array());
+        $element[$delta]['#options']['attributes'] += $item->_attributes;
+        // Unset field item attributes since they have been included in the
+        // formatter output and should not be rendered in the field template.
+        unset($item->_attributes);
+      }
     }
     return $element;
   }
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php
index fa9775f..726d661 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/EmailFieldRdfaTest.php
@@ -53,8 +53,9 @@ public function setUp() {
    */
   public function testAllFormatters() {
     // Test the plain formatter.
-    $this->assertFormatterRdfa(array('type'=>'string'), 'http://schema.org/email', array('value' => $this->testValue));
+    $this->assertFormatterRdfa(array('type' => 'string'), 'http://schema.org/email', array('value' => $this->testValue));
+
     // Test the mailto formatter.
-    $this->assertFormatterRdfa(array('type'=>'email_mailto'), 'http://schema.org/email', array('value' => $this->testValue));
+    $this->assertFormatterRdfa(array('type' => 'email_mailto'), 'http://schema.org/email', array('value' => $this->testValue));
   }
 }
diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaTestBase.php b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaTestBase.php
index 14bcfa1..6542939 100644
--- a/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaTestBase.php
+++ b/core/modules/rdf/lib/Drupal/rdf/Tests/Field/FieldRdfaTestBase.php
@@ -74,6 +74,7 @@ public function setUp() {
    *   - datatype: (optional) The datatype of the value (e.g. xsd:dateTime).
    */
   protected function assertFormatterRdfa($formatter, $property, $expected_rdf_value) {
+    // Merge in the default value type of "literal" if one wasn't given.
     $expected_rdf_value += array('type' => 'literal');
 
     // The field formatter will be rendered inside the entity. Set the field
