[wp-trac] [WordPress Trac] #52694: Twenty Twenty-One: Primary menu toggle filter adds toggles to third party menu locations

WordPress Trac noreply at wordpress.org
Mon Apr 15 10:25:10 UTC 2024


#52694: Twenty Twenty-One: Primary menu toggle filter adds toggles to third party
menu locations
-------------------------------------+---------------------
 Reporter:  domainsupport            |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  6.6
Component:  Bundled Theme            |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------
Changes (by domainsupport):

 * keywords:  has-patch needs-testing-info needs-testing => has-patch needs-
     testing


Comment:

 == Testing Instructions
 These steps define how to reproduce the issue, and indicate the expected
 behavior.

 The easiest way is to use a legacy Navigation Menu widget as follows ...

 === Steps to Reproduce
 1. Install WordPress.
 2. Activate Twenty Twenty-One theme
 3. Install and activate "Classic Widgets" plugin
 4. Create a new Menu with a parent menu item and child menu item
 5. Add a legacy "Navigation Menu" widget to the Footer widget area and
 select your menu
 6. View the front page and examine the footer widget HTML
 7. 🐞 You will see there is a `button` element that shouldn't be there ...

 {{{
 <button class="sub-menu-toggle" aria-expanded="false"
 onclick="twentytwentyoneExpandSubMenu(this)"><span class="icon-plus"><svg
 class="svg-icon" width="18" height="18" aria-hidden="true" role="img"
 focusable="false" viewBox="0 0 24 24" fill="none"
 xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-
 rule="evenodd" d="M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"
 fill="currentColor"></path></svg></span><span class="icon-minus"><svg
 class="svg-icon" width="18" height="18" aria-hidden="true" role="img"
 focusable="false" viewBox="0 0 24 24" fill="none"
 xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-
 rule="evenodd" d="M6 11h12v2H6z"
 fill="currentColor"></path></svg></span><span class="screen-reader-
 text">Open menu</span></button>
 }}}


 === Expected Results
 When testing a patch to validate it works as expected:
 - ✅ No `button` element should be appended to the menu outside of the
 `primary` menu location

 When reproducing a bug:
 - ❌ `button` element appears

   **Test Report Icons:**
   🐞 <= Indicates where issue ("bug") occurs.
   ✅ <= Behavior is ''expected''.
   ❌ <= Behavior is ''NOT expected''.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52694#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list