diff --git a/core/modules/config/src/Form/ConfigSingleExportForm.php b/core/modules/config/src/Form/ConfigSingleExportForm.php
index 2a7ac00f1078df6355e5c156df657a9a027000cc..963a6a1d9d41080246498c71c4e3557dcbe417ea 100644
--- a/core/modules/config/src/Form/ConfigSingleExportForm.php
+++ b/core/modules/config/src/Form/ConfigSingleExportForm.php
@@ -173,7 +173,7 @@ protected function findConfiguration($config_type) {
       foreach ($entity_storage->loadMultiple() as $entity) {
         $entity_id = $entity->id();
         if ($label = $entity->label()) {
-          $names[$entity_id] = new TranslatableMarkup('@label (@id)', ['@label' => $label, '@id' => $entity_id]);
+          $names[$entity_id] = new TranslatableMarkup('@id (@label)', ['@label' => $label, '@id' => $entity_id]);
         }
         else {
           $names[$entity_id] = $entity_id;
diff --git a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
index 8e55ab7890ca443d74b077b2085f9a8cab5f5ca1..215f5d24578bc8faeb3e25d7af1a14b93c715c65 100644
--- a/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigSingleImportExportTest.php
@@ -278,7 +278,7 @@ public function testExport() {
     // Verify that the fallback date format config entity is selected when
     // specified in the URL.
     $this->drupalGet('admin/config/development/configuration/single/export/date_format/fallback');
-    $option_node = $this->assertSession()->optionExists("config_name", 'Fallback date format (fallback)');
+    $option_node = $this->assertSession()->optionExists("config_name", 'fallback (Fallback date format)');
     $this->assertTrue($option_node->isSelected());
     $fallback_date = \Drupal::entityTypeManager()->getStorage('date_format')->load('fallback');
     $yaml_text = $this->assertSession()->fieldExists('export')->getValue();
diff --git a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
index 5c87adc37137ceb418b5ffab13ef6c61bd7d8bbc..ae1c582348f3b1af20db80ed676e43675da34f51 100644
--- a/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
+++ b/core/modules/config/tests/src/FunctionalJavascript/ConfigExportTest.php
@@ -4,6 +4,7 @@
 
 namespace Drupal\Tests\config\FunctionalJavascript;
 
+use Drupal\block_content\Entity\BlockContent;
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
 
 /**
@@ -16,19 +17,71 @@ class ConfigExportTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  protected static $modules = ['config', 'system'];
+  protected static $modules = ['config', 'system', 'block', 'block_content'];
 
   /**
    * {@inheritdoc}
    */
   protected $defaultTheme = 'stark';
 
+  /**
+   * @var string
+   *  A prefix string used in naming the test blocks.
+   */
+  protected string $blockNamePrefix = 'aaaaaa_config_export_test_block';
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp(): void {
+    parent::setUp();
+
+    $this->drupalLogin($this->drupalCreateUser([
+      'administer blocks',
+      'access block library',
+      'administer block types',
+      'administer block content',
+    ]));
+
+    // Create test blocks, so we know what the titles will be to check their order.
+    foreach ([1, 2, 3, 4] as $num) {
+      $block_name = $this->blockNamePrefix . $num;
+      $new_block = $this->createBlockContent($block_name);
+      $this->drupalPlaceBlock('block_content:' . $new_block->uuid(), [
+        'id' => $block_name,
+        'label' => $this->randomMachineName(),
+        'theme' => $this->defaultTheme,
+        'region' => 'sidebar_first',
+      ]);
+    }
+  }
+
+  /**
+   * Creates test blocks.
+   *
+   * @param $title
+   *   Title of the block.
+   *
+   * @return \Drupal\block_content\Entity\BlockContent
+   *
+   * @throws \Drupal\Core\Entity\EntityStorageException
+   */
+  protected function createBlockContent($title) {
+    $block_content = BlockContent::create([
+      'info' => $title,
+      'type' => 'basic',
+    ]);
+    $block_content->save();
+    return $block_content;
+  }
+
   /**
    * Tests Ajax form functionality on the config export page.
    */
   public function testAjaxOnExportPage() {
     $this->drupalLogin($this->drupalCreateUser([
       'export configuration',
+      'administer blocks',
     ]));
 
     $page = $this->getSession()->getPage();
@@ -53,6 +106,17 @@ public function testAjaxOnExportPage() {
     $page->selectFieldOption('config_type', 'Action');
     $this->assertSession()->assertWaitOnAjaxRequest();
     $this->assertSession()->fieldValueEquals('export', '');
+
+    // Check that the 'Configuration name' list is sorted alphabetically by ID,
+    // which always begins with our prefix, and not the label, which is randomized.
+    $page->selectFieldOption('config_type', 'Block');
+    $this->assertSession()->assertWaitOnAjaxRequest();
+    $options = $page->findField('config_name')->findAll('css', 'option');
+    foreach ([1, 2, 3, 4] as $num) {
+      $block_name = $this->blockNamePrefix . $num;
+      $this->assertStringStartsWith($block_name, $options[$num]->getText());
+      $this->assertEquals($block_name, $options[$num]->getValue());
+    }
   }
 
 }