diff --git a/core/lib/Drupal/Core/Render/Element/RenderElement.php b/core/lib/Drupal/Core/Render/Element/RenderElement.php index 35814589b3..76992003aa 100644 --- a/core/lib/Drupal/Core/Render/Element/RenderElement.php +++ b/core/lib/Drupal/Core/Render/Element/RenderElement.php @@ -139,7 +139,9 @@ public static function setAttributes(&$element, $class = []) { if (!empty($element['#required'])) { $element['#attributes']['class'][] = 'required'; $element['#attributes']['required'] = 'required'; - $element['#attributes']['aria-required'] = 'true'; + if ($element['#type'] != 'checkbox') { + $element['#attributes']['aria-required'] = 'true'; + } } if (isset($element['#parents']) && isset($element['#errors']) && !empty($element['#validated'])) { $element['#attributes']['class'][] = 'error';