diff --git a/core/core.services.yml b/core/core.services.yml
index 1f6880b..d8b650a 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -566,7 +566,7 @@ services:
     class: Symfony\Component\HttpKernel\HttpKernel
     arguments: ['@event_dispatcher', '@controller_resolver', '@request_stack']
   http_negotiation.format_negotiator:
-    class: Drupal\Core\ContentNegotiation
+    class: Drupal\Core\FormatMapping
     private: true
   http_middleware.negotiation:
     class: Drupal\Core\StackMiddleware\NegotiationMiddleware
diff --git a/core/lib/Drupal/Core/ContentNegotiation.php b/core/lib/Drupal/Core/FormatMapping.php
similarity index 88%
rename from core/lib/Drupal/Core/ContentNegotiation.php
rename to core/lib/Drupal/Core/FormatMapping.php
index 857f9d5..40e6aea 100644
--- a/core/lib/Drupal/Core/ContentNegotiation.php
+++ b/core/lib/Drupal/Core/FormatMapping.php
@@ -2,7 +2,7 @@
 
 /**
  * @file
- * Definition of Drupal\Core\ContentNegotiation.
+ * Contains \Drupal\Core\FormatMapping.
  */
 
 namespace Drupal\Core;
@@ -15,7 +15,7 @@
  * @todo Replace this class with a real content negotiation library based on
  *   mod_negotiation. Development of that is a work in progress.
  */
-class ContentNegotiation {
+class FormatMapping {
 
   /**
    * Gets the normalized type of a request.
@@ -36,12 +36,15 @@ public function getContentType(Request $request) {
       return 'iframeupload';
     }
 
+    if ($type = $request->query->get('dialogType')) {
+      return 'drupal_' . $type;
+    }
+
     // Check all formats, if priority format is found return it.
     $first_found_format = FALSE;
-    $priority = array('html', 'drupal_ajax', 'drupal_modal', 'drupal_dialog');
     foreach ($request->getAcceptableContentTypes() as $mime_type) {
       $format = $request->getFormat($mime_type);
-      if (in_array($format, $priority, TRUE)) {
+      if ($format === 'html') {
         return $format;
       }
       if (!is_null($format) && !$first_found_format) {
diff --git a/core/lib/Drupal/Core/Render/Element/RenderElement.php b/core/lib/Drupal/Core/Render/Element/RenderElement.php
index 0283333..87b9f02 100644
--- a/core/lib/Drupal/Core/Render/Element/RenderElement.php
+++ b/core/lib/Drupal/Core/Render/Element/RenderElement.php
@@ -240,7 +240,7 @@ public static function preRenderAjaxForm($element) {
       $settings += array(
         'url' => isset($settings['callback']) ? Url::fromRoute('system.ajax') : NULL,
         'options' => array(),
-        'accepts' => 'application/vnd.drupal-ajax'
+        'dialogType' => 'ajax',
       );
 
       // @todo Legacy support. Remove in Drupal 8.
diff --git a/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php b/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
index 295857d..8fa0173 100644
--- a/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
+++ b/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php
@@ -7,7 +7,7 @@
 
 namespace Drupal\Core\StackMiddleware;
 
-use Drupal\Core\ContentNegotiation;
+use Drupal\Core\FormatMapping;
 use Drupal\Core\ContentNegotiationInterface;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpKernel\HttpKernelInterface;
@@ -29,7 +29,7 @@ class NegotiationMiddleware implements HttpKernelInterface {
   /**
    * The content negotiator.
    *
-   * @var \Drupal\Core\ContentNegotiation
+   * @var \Drupal\Core\FormatMapping
    */
   protected $negotiator;
 
@@ -45,10 +45,10 @@ class NegotiationMiddleware implements HttpKernelInterface {
    *
    * @param \Symfony\Component\HttpKernel\HttpKernelInterface $app
    *   The wrapper HTTP kernel
-   * @param \Drupal\Core\ContentNegotiation $negotiator
+   * @param \Drupal\Core\FormatMapping $negotiator
    *   The content negotiator.
    */
-  public function __construct(HttpKernelInterface $app, ContentNegotiation $negotiator) {
+  public function __construct(HttpKernelInterface $app, FormatMapping $negotiator) {
     $this->app = $app;
     $this->negotiator = $negotiator;
   }
diff --git a/core/misc/ajax.js b/core/misc/ajax.js
index 91e8e1c..8498090 100644
--- a/core/misc/ajax.js
+++ b/core/misc/ajax.js
@@ -52,7 +52,7 @@
           element_settings.url = $(this).attr('href');
           element_settings.event = 'click';
         }
-        element_settings.accepts = $(this).data('accepts');
+        element_settings.dialogType = $(this).data('dialog-type');
         element_settings.dialog = $(this).data('dialog-options');
         var baseUseAjax = $(this).attr('id');
         Drupal.ajax[baseUseAjax] = new Drupal.ajax(baseUseAjax, this, element_settings);
@@ -248,9 +248,6 @@
         }
       },
       dataType: 'json',
-      accepts: {
-        json: element_settings.accepts || 'application/vnd.drupal-ajax'
-      },
       type: 'POST'
     };
 
@@ -258,6 +255,18 @@
       ajax.options.data.dialogOptions = element_settings.dialog;
     }
 
+    if (element_settings.dialogType) {
+      // Ensure that we have a valid URL by adding ? when no query parameter is
+      // yet available, otherwise append using &.
+      if (ajax.options.url.indexOf('?') === -1) {
+        ajax.options.url += '?';
+      }
+      else {
+        ajax.options.url += '&';
+      }
+      ajax.options.url += 'dialogType=' + element_settings.dialogType;
+    }
+
     // Bind the ajaxSubmit function to the element event.
     $(ajax.element).on(element_settings.event, function (event) {
       return ajax.eventResponse(this, event);
diff --git a/core/modules/block/src/BlockListBuilder.php b/core/modules/block/src/BlockListBuilder.php
index 6521287..913b718 100644
--- a/core/modules/block/src/BlockListBuilder.php
+++ b/core/modules/block/src/BlockListBuilder.php
@@ -362,7 +362,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
         ]),
         'attributes' => array(
           'class' => array('use-ajax', 'block-filter-text-source'),
-          'data-accepts' => 'application/vnd.drupal-modal',
+          'data-dialog-type' => 'modal',
           'data-dialog-options' => Json::encode(array(
             'width' => 700,
           )),
diff --git a/core/modules/ckeditor/js/ckeditor.js b/core/modules/ckeditor/js/ckeditor.js
index 1596808..5d9e969 100644
--- a/core/modules/ckeditor/js/ckeditor.js
+++ b/core/modules/ckeditor/js/ckeditor.js
@@ -161,7 +161,7 @@
       var $content = $('<div class="ckeditor-dialog-loading"><span style="top: -40px;" class="ckeditor-dialog-loading-link"><a>' + Drupal.t('Loading...') + '</a></span></div>');
       $content.appendTo($target);
       new Drupal.ajax('ckeditor-dialog', $content.find('a').get(0), {
-        accepts: 'application/vnd.drupal-modal',
+        dialogType: 'modal',
         dialog: dialogSettings,
         selector: '.ckeditor-dialog-loading-link',
         url: url,
diff --git a/core/modules/config/src/Form/ConfigSync.php b/core/modules/config/src/Form/ConfigSync.php
index b97218b..0a91758 100644
--- a/core/modules/config/src/Form/ConfigSync.php
+++ b/core/modules/config/src/Form/ConfigSync.php
@@ -281,7 +281,7 @@ public function buildForm(array $form, FormStateInterface $form_state) {
             'url' => Url::fromRoute($route_name, $route_options),
             'attributes' => array(
               'class' => array('use-ajax'),
-              'data-accepts' => 'application/vnd.drupal-modal',
+              'data-dialog-type' => 'modal',
               'data-dialog-options' => json_encode(array(
                 'width' => 700
               )),
diff --git a/core/modules/system/src/Tests/Ajax/DialogTest.php b/core/modules/system/src/Tests/Ajax/DialogTest.php
index 482e025..28a3d0c 100644
--- a/core/modules/system/src/Tests/Ajax/DialogTest.php
+++ b/core/modules/system/src/Tests/Ajax/DialogTest.php
@@ -165,7 +165,7 @@ public function testDialog() {
         'callback' => '::preview',
         'event' => 'click',
         'url' => Url::fromRoute('system.ajax')->toString(),
-        'accepts' => 'application/vnd.drupal-ajax',
+        'dialogType' => 'ajax',
         'submit' => [
           '_triggering_element_name' => 'op',
           '_triggering_element_value' => 'Preview',
diff --git a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
index b54b823..ba261cb 100644
--- a/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
+++ b/core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
@@ -133,7 +133,7 @@ public function dialog() {
           'url' => Url::fromRoute('ajax_test.dialog_contents'),
           'attributes' => array(
             'class' => array('use-ajax'),
-            'data-accepts' => 'application/vnd.drupal-modal',
+            'data-dialog-type' => 'modal',
             'data-dialog-options' => json_encode(array(
               'width' => 400,
             ))
@@ -144,7 +144,7 @@ public function dialog() {
           'url' => Url::fromRoute('ajax_test.dialog_contents'),
           'attributes' => array(
             'class' => array('use-ajax'),
-            'data-accepts' => 'application/vnd.drupal-dialog',
+            'data-dialog-type' => 'dialog',
             'data-dialog-options' => json_encode(array(
               'target' => 'ajax-test-dialog-wrapper-1',
               'width' => 800,
@@ -163,7 +163,7 @@ public function dialog() {
           'url' => Url::fromRoute('ajax_test.dialog_form'),
           'attributes' => array(
             'class' => array('use-ajax'),
-            'data-accepts' => 'application/vnd.drupal-modal',
+            'data-dialog-type' => 'modal',
           ),
         ),
         'link6' => array(
@@ -171,7 +171,7 @@ public function dialog() {
           'url' => Url::fromRoute('contact.form_add'),
           'attributes' => array(
             'class' => array('use-ajax'),
-            'data-accepts' => 'application/vnd.drupal-modal',
+            'data-dialog-type' => 'modal',
             'data-dialog-options' => json_encode(array(
               'width' => 800,
               'height' => 500,
@@ -183,7 +183,7 @@ public function dialog() {
           'url' => Url::fromRoute('ajax_test.dialog_contents'),
           'attributes' => array(
             'class' => array('use-ajax'),
-            'data-accepts' => 'application/vnd.drupal-dialog',
+            'data-dialog-type' => 'dialog',
             'data-dialog-options' => json_encode(array(
               'width' => 800,
             ))
diff --git a/core/tests/Drupal/Tests/Core/ContentNegotiationTest.php b/core/tests/Drupal/Tests/Core/FormatMappingTest.php
similarity index 58%
rename from core/tests/Drupal/Tests/Core/ContentNegotiationTest.php
rename to core/tests/Drupal/Tests/Core/FormatMappingTest.php
index e411008..f24e09b 100644
--- a/core/tests/Drupal/Tests/Core/ContentNegotiationTest.php
+++ b/core/tests/Drupal/Tests/Core/FormatMappingTest.php
@@ -7,20 +7,20 @@
 
 namespace Drupal\Tests\Core;
 
-use Drupal\Core\ContentNegotiation;
+use Drupal\Core\FormatMapping;
 use Drupal\Tests\UnitTestCase;
 use Symfony\Component\HttpFoundation\Request;
 
 /**
- * @coversDefaultClass \Drupal\Core\ContentNegotiation
- * @group ContentNegotiation
+ * @coversDefaultClass \Drupal\Core\FormatMapping
+ * @group FormatMapping
  */
-class ContentNegotiationTest extends UnitTestCase {
+class FormatMappingTest extends UnitTestCase {
 
   /**
-   * @var \Drupal\Core\ContentNegotiation
+   * @var \Drupal\Core\FormatMapping
    */
-  protected $contentNegotiation;
+  protected $formatMapping;
 
   /**
    * {@inheritdoc}
@@ -28,7 +28,7 @@ class ContentNegotiationTest extends UnitTestCase {
   protected function setUp() {
     parent::setUp();
 
-    $this->contentNegotiation = new ContentNegotiation;
+    $this->formatMapping = new FormatMapping;
   }
 
   /**
@@ -40,7 +40,7 @@ public function testAjaxIframeUpload() {
     $request = new Request();
     $request->attributes->set('ajax_iframe_upload', '1');
 
-    $this->assertSame('iframeupload', $this->contentNegotiation->getContentType($request));
+    $this->assertSame('iframeupload', $this->formatMapping->getContentType($request));
   }
 
   /**
@@ -51,19 +51,21 @@ public function testAjaxIframeUpload() {
    */
   public function testAPriorityFormatIsFound($priority, $format) {
     $request = new Request();
-    $request->setFormat($format['format'], $format['mime_type']);
-    $request->headers->set('Accept', sprintf('%s,application/json', $format['mime_type']));
 
-    $this->assertSame($priority, $this->contentNegotiation->getContentType($request));
+    if ($format) {
+      $request->query->set('dialogType', $format);
+    }
+
+    $this->assertSame($priority, $this->formatMapping->getContentType($request));
   }
 
   public function priorityFormatProvider()
   {
     return [
-      ['drupal_dialog', ['format' => 'drupal_dialog', 'mime_type' => 'application/vnd.drupal-dialog']],
-      ['drupal_modal', ['format' => 'drupal_modal', 'mime_type' => 'application/vnd.drupal-modal']],
-      ['drupal_ajax', ['format' => 'drupal_ajax', 'mime_type' => 'application/vnd.drupal-ajax']],
-      ['html', ['format' => 'html', 'mime_type' => 'text/html']],
+      ['drupal_dialog', 'dialog'],
+      ['drupal_modal', 'modal'],
+      ['drupal_ajax', 'ajax'],
+      ['html', ''],
     ];
   }
 
@@ -76,7 +78,7 @@ public function testNoPriorityFormatIsFoundButReturnsTheFirstValidOne() {
     $request = new Request();
     $request->headers->set('Accept', 'application/rdf+xml');
 
-    $this->assertSame('rdf', $this->contentNegotiation->getContentType($request));
+    $this->assertSame('rdf', $this->formatMapping->getContentType($request));
   }
 
   /**
@@ -87,7 +89,7 @@ public function testNoPriorityFormatIsFoundButReturnsTheFirstValidOne() {
   public function testUnknowContentTypeReturnsHtmlByDefault() {
     $request = new Request();
 
-    $this->assertSame('html', $this->contentNegotiation->getContentType($request));
+    $this->assertSame('html', $this->formatMapping->getContentType($request));
   }
 
   /**
@@ -99,7 +101,7 @@ public function testUnknowContentTypeButAjaxRequest() {
     $request = new Request();
     $request->headers->set('X-Requested-With', 'XMLHttpRequest');
 
-    $this->assertSame('ajax', $this->contentNegotiation->getContentType($request));
+    $this->assertSame('ajax', $this->formatMapping->getContentType($request));
   }
 
 }
