diff --git a/core/modules/inline_form_errors/inline_form_errors.module b/core/modules/inline_form_errors/inline_form_errors.module
index d5c40b4..dcb140b 100644
--- a/core/modules/inline_form_errors/inline_form_errors.module
+++ b/core/modules/inline_form_errors/inline_form_errors.module
@@ -6,6 +6,7 @@
  */
 
 use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\inline_form_errors\RenderElementHelper;
 
 /**
  * Implements hook_help().
@@ -55,6 +56,14 @@ function inline_form_errors_preprocess_datetime_wrapper(&$variables) {
 }
 
 /**
+ * Implements hook_element_info_alter().
+ */
+function inline_form_errors_element_info_alter(array &$info) {
+  \Drupal::classResolver()->getInstanceFromDefinition(RenderElementHelper::class)
+    ->alterElementInfo($info);
+}
+
+/**
  * Populates form errors in the template.
  */
 function _inline_form_errors_set_errors(&$variables) {
diff --git a/core/modules/inline_form_errors/src/FormErrorHandler.php b/core/modules/inline_form_errors/src/FormErrorHandler.php
index 2b892e9..2bcbfc6 100644
--- a/core/modules/inline_form_errors/src/FormErrorHandler.php
+++ b/core/modules/inline_form_errors/src/FormErrorHandler.php
@@ -47,15 +47,23 @@ public function __construct(TranslationInterface $string_translation, LinkGenera
   /**
    * Loops through and displays all form errors.
    *
+   * To disable inline form errors for an entire form set the
+   * #disable_inline_form_errors property to TRUE on the top level of the $form
+   * array:
+   * @code
+   * $form['#disable_inline_form_errors'] = TRUE;
+   * @endcode
+   * This should only be done when another appropriate accessibility strategy is
+   * in place.
+   *
    * @param array $form
    *   An associative array containing the structure of the form.
    * @param \Drupal\Core\Form\FormStateInterface $form_state
    *   The current state of the form.
    */
   protected function displayErrorMessages(array $form, FormStateInterface $form_state) {
-    // Use the original error display for Quick Edit forms, because in this case
-    // the errors are already near the form element.
-    if ($form['#form_id'] === 'quickedit_field_form') {
+    // Skip generating inline form errors when opted out.
+    if (!empty($form['#disable_inline_form_errors'])) {
       parent::displayErrorMessages($form, $form_state);
       return;
     }
diff --git a/core/modules/inline_form_errors/src/RenderElementHelper.php b/core/modules/inline_form_errors/src/RenderElementHelper.php
new file mode 100644
index 0000000..a96d77d
--- /dev/null
+++ b/core/modules/inline_form_errors/src/RenderElementHelper.php
@@ -0,0 +1,49 @@
+<?php
+
+namespace Drupal\inline_form_errors;
+
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Provides functionality to process render elements.
+ */
+class RenderElementHelper {
+
+  /**
+   * Alters the element type info.
+   *
+   * @param array $info
+   *   An associative array with structure identical to that of the return value
+   *   of \Drupal\Core\Render\ElementInfoManagerInterface::getInfo().
+   */
+  public function alterElementInfo(array &$info) {
+    foreach ($info as $element_type => $element_info) {
+      $info[$element_type]['#process'][] = [static::class, 'processElement'];
+    }
+  }
+
+  /**
+   * Process all render elements.
+   *
+   * @param array $element
+   *   An associative array containing the properties and children of the
+   *   element. Note that $element must be taken by reference here, so processed
+   *   child elements are taken over into $form_state.
+   * @param \Drupal\Core\Form\FormStateInterface $form_state
+   *   The current state of the form.
+   * @param array $complete_form
+   *   The complete form structure.
+   *
+   * @return array
+   *   The processed element.
+   */
+  public static function processElement(array &$element, FormStateInterface $form_state, array &$complete_form) {
+    // Prevent displaying inline form errors when disabled for the whole form.
+    if (!empty($complete_form['#disable_inline_form_errors'])) {
+      $element['#error_no_message'] = TRUE;
+    }
+
+    return $element;
+  }
+
+}
diff --git a/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php b/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
new file mode 100644
index 0000000..4bf389e
--- /dev/null
+++ b/core/modules/inline_form_errors/tests/src/Kernel/FormElementInlineErrorTest.php
@@ -0,0 +1,48 @@
+<?php
+
+namespace Drupal\Tests\inline_form_errors\Kernel;
+
+use Drupal\Core\Form\FormState;
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests messages on form elements.
+ *
+ * @group InlineFormErrors
+ */
+class FormElementInlineErrorTest extends KernelTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['inline_form_errors'];
+
+  /**
+   * Tests that no inline form errors are shown when disabled for a form.
+   */
+  public function testDisplayErrorMessagesNotInline() {
+    $form_id = 'test';
+
+    $form = [
+      '#parents' => [],
+      '#disable_inline_form_errors' => TRUE,
+      '#array_parents' => [],
+    ];
+    $form['test'] = [
+      '#type' => 'textfield',
+      '#title' => 'Test',
+      '#parents' => ['test'],
+      '#id' => 'edit-test',
+      '#array_parents' => ['test'],
+    ];
+    $form_state = new FormState();
+
+    \Drupal::formBuilder()->prepareForm($form_id, $form, $form_state);
+    \Drupal::formBuilder()->processForm($form_id, $form, $form_state);
+
+    // Just test if the #error_no_message property is TRUE. FormErrorHandlerTest
+    // tests if the property actually hides the error message.
+    $this->assertArraySubset(['#error_no_message' => TRUE], $form['test']);
+  }
+
+}
diff --git a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
index acd255b..f110b36 100644
--- a/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
+++ b/core/modules/inline_form_errors/tests/src/Unit/FormErrorHandlerTest.php
@@ -140,12 +140,9 @@ public function testSetElementErrorsFromFormState() {
   }
 
   /**
-   * Test that Quick Edit forms show non-inline errors.
-   *
-   * @covers ::handleFormErrors
-   * @covers ::displayErrorMessages
+   * Tests that opting out of Inline Form Errors works.
    */
-  public function testDisplayErrorMessagesNotInlineQuickEdit() {
+  public function testDisplayErrorMessagesNotInline() {
     $form_error_handler = $this->getMockBuilder(FormErrorHandler::class)
       ->setConstructorArgs([$this->getStringTranslationStub(), $this->getMock(LinkGeneratorInterface::class), $this->getMock(RendererInterface::class)])
       ->setMethods(['drupalSetMessage'])
@@ -157,7 +154,7 @@ public function testDisplayErrorMessagesNotInlineQuickEdit() {
 
     $form = [
       '#parents' => [],
-      '#form_id' => 'quickedit_field_form',
+      '#disable_inline_form_errors' => TRUE,
       '#array_parents' => [],
     ];
     $form['test'] = [
@@ -165,7 +162,7 @@ public function testDisplayErrorMessagesNotInlineQuickEdit() {
       '#title' => 'Test',
       '#parents' => ['test'],
       '#id' => 'edit-test',
-      '#array_parents' => ['test']
+      '#array_parents' => ['test'],
     ];
     $form_state = new FormState();
     $form_state->setErrorByName('test', 'invalid');
diff --git a/core/modules/quickedit/src/Form/QuickEditFieldForm.php b/core/modules/quickedit/src/Form/QuickEditFieldForm.php
index ba2dac3..7603159 100644
--- a/core/modules/quickedit/src/Form/QuickEditFieldForm.php
+++ b/core/modules/quickedit/src/Form/QuickEditFieldForm.php
@@ -114,6 +114,10 @@ public function buildForm(array $form, FormStateInterface $form_state, EntityInt
       '#attributes' => ['class' => ['quickedit-form-submit']],
     ];
 
+    // Use the non-inline form error display for Quick Edit forms, because in
+    // this case the errors are already near the form element.
+    $form['#disable_inline_form_errors'] = TRUE;
+
     // Simplify it for optimal in-place use.
     $this->simplify($form, $form_state);
 
