File tree Expand file tree Collapse file tree 4 files changed +22
-16
lines changed
dev/tests/static/testsuite/Magento/Test/Integrity/App/Language/_files Expand file tree Collapse file tree 4 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 11<?php
22/**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
3+ * Copyright 2025 Adobe
4+ * All Rights Reserved .
55 */
66namespace Magento \Theme \Block \Html ;
77
@@ -246,14 +246,17 @@ protected function _getHtml(
246246 }
247247
248248 $ html .= '<li ' . $ this ->_getRenderedMenuItemAttributes ($ child ) . '> ' ;
249- $ html .= '<a href=" ' . $ child ->getUrl () . '" ' . $ outermostClassCode . '><span> ' . $ this ->escapeHtml (
250- $ child ->getName ()
251- ) . '</span></a> ' . $ this ->_addSubMenu (
252- $ child ,
253- $ childLevel ,
254- $ childrenWrapClass ,
255- $ limit
256- ) . '</li> ' ;
249+ $ html .= '<a href=" ' . $ child ->getUrl () . '" '
250+ . $ outermostClassCode
251+ . 'role="menuitem"><span> '
252+ . $ this ->escapeHtml (
253+ $ child ->getName ()
254+ ) . '</span></a> ' . $ this ->_addSubMenu (
255+ $ child ,
256+ $ childLevel ,
257+ $ childrenWrapClass ,
258+ $ limit
259+ ) . '</li> ' ;
257260 $ counter ++;
258261 }
259262
@@ -288,7 +291,10 @@ protected function _getRenderedMenuItemAttributes(Node $item)
288291 */
289292 protected function _getMenuItemAttributes (Node $ item )
290293 {
291- return ['class ' => implode (' ' , $ this ->_getMenuItemClasses ($ item ))];
294+ return [
295+ 'class ' => implode (' ' , $ this ->_getMenuItemClasses ($ item )),
296+ 'role ' => 'presentation '
297+ ];
292298 }
293299
294300 /**
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ class TopmenuTest extends TestCase
7979 // @codingStandardsIgnoreStart
8080 /** @var string */
8181 private $ navigationMenuHtml = <<<HTML
82- <li class="level0 nav-1 first"><a href="http://magento2/category-0.html" ><span></span></a></li><li class="level0 nav-2"><a href="http://magento2/category-1.html" ><span></span></a></li><li class="level0 nav-3"><a href="http://magento2/category-2.html" ><span></span></a></li><li class="level0 nav-4"><a href="http://magento2/category-3.html" ><span></span></a></li><li class="level0 nav-5"><a href="http://magento2/category-4.html" ><span></span></a></li><li class="level0 nav-6"><a href="http://magento2/category-5.html" ><span></span></a></li><li class="level0 nav-7"><a href="http://magento2/category-6.html" ><span></span></a></li><li class="level0 nav-8"><a href="http://magento2/category-7.html" ><span></span></a></li><li class="level0 nav-9"><a href="http://magento2/category-8.html" ><span></span></a></li><li class="level0 nav-10 last"><a href="http://magento2/category-9.html" ><span></span></a></li>
82+ <li class="level0 nav-1 first" role="presentation"><a href="http://magento2/category-0.html" role="menuitem"><span></span></a></li><li class="level0 nav-2" role="presentation"><a href="http://magento2/category-1.html" role="menuitem"><span></span></a></li><li class="level0 nav-3" role="presentation"><a href="http://magento2/category-2.html" role="menuitem"><span></span></a></li><li class="level0 nav-4" role="presentation"><a href="http://magento2/category-3.html" role="menuitem"><span></span></a></li><li class="level0 nav-5" role="presentation"><a href="http://magento2/category-4.html" role="menuitem"><span></span></a></li><li class="level0 nav-6" role="presentation"><a href="http://magento2/category-5.html" role="menuitem"><span></span></a></li><li class="level0 nav-7" role="presentation"><a href="http://magento2/category-6.html" role="menuitem"><span></span></a></li><li class="level0 nav-8" role="presentation"><a href="http://magento2/category-7.html" role="menuitem"><span></span></a></li><li class="level0 nav-9" role="presentation"><a href="http://magento2/category-8.html" role="menuitem"><span></span></a></li><li class="level0 nav-10 last" role="presentation"><a href="http://magento2/category-9.html" role="menuitem"><span></span></a></li>
8383HTML ;
8484 // @codingStandardsIgnoreEnd
8585
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<!--
33/**
4- * Copyright © Magento, Inc. All rights reserved.
5- * See COPYING.txt for license details .
4+ * Copyright 2011 Adobe
5+ * All Rights Reserved .
66 */
77-->
88<language xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:App/Language/package.xsd" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<!--
33/**
4- * Copyright © Magento, Inc. All rights reserved.
5- * See COPYING.txt for license details .
4+ * Copyright 2011 Adobe
5+ * All Rights Reserved .
66 */
77-->
88<language xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:App/Language/package.xsd" >
You can’t perform that action at this time.
0 commit comments