diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php index a156b8f6d23ec..1029e904f7501 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/LayoutTest.php @@ -253,17 +253,28 @@ public function testAddContainer($htmlTag) public function addContainerDataProvider() { return [ + ['aside'], ['dd'], ['div'], ['dl'], ['fieldset'], + ['main'], + ['nav'], ['header'], + ['footer'], ['ol'], ['p'], ['section'], ['table'], ['tfoot'], - ['ul'] + ['ul'], + ['article'], + ['h1'], + ['h2'], + ['h3'], + ['h4'], + ['h5'], + ['h6'], ]; } @@ -274,7 +285,7 @@ public function testAddContainerInvalidHtmlTag() { $msg = 'Html tag "span" is forbidden for usage in containers. ' . 'Consider to use one of the allowed: aside, dd, div, dl, fieldset, main, nav, ' . - 'header, footer, ol, p, section, table, tfoot, ul, article.'; + 'header, footer, ol, p, section, table, tfoot, ul, article, h1, h2, h3, h4, h5, h6.'; $this->expectException(\Magento\Framework\Exception\LocalizedException::class); $this->expectExceptionMessage($msg); $this->_layout->addContainer('container', 'Container', ['htmlTag' => 'span']); diff --git a/lib/internal/Magento/Framework/View/Layout/Generator/Container.php b/lib/internal/Magento/Framework/View/Layout/Generator/Container.php index 075f8148a4504..87357e90845c0 100644 --- a/lib/internal/Magento/Framework/View/Layout/Generator/Container.php +++ b/lib/internal/Magento/Framework/View/Layout/Generator/Container.php @@ -43,6 +43,12 @@ class Container implements Layout\GeneratorInterface 'tfoot', 'ul', 'article', + 'h1', + 'h2', + 'h3', + 'h4', + 'h5', + 'h6', ]; /** diff --git a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd index 17857c9ab0658..51f193109d938 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/elements.xsd @@ -140,6 +140,13 @@ + + + + + + +