Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 UTC on 18 March 2024, to get $100 off your ticket.
By default the page.html.twig template contains a toggle that doesn't have the collapsed class or the aria-exapanded value.
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
Since the menu is collapsed by default the toggle should initially reflect that (as it indeed does once you toggle the menu on then off)
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false">
Patch attached
Comment | File | Size | Author |
---|---|---|---|
toggle-collapsed-by-default.patch | 768 bytes | ac | |
Comments
Comment #2
piyushsms91 CreditAttribution: piyushsms91 at TATA Consultancy Services for Pfizer, Inc. commentedHi AC,
I have tested the patch, It is woking perfectly.
Logically also it is correct, "collapsed" class should add by default on page load.
https://www.drupal.org/files/issues/2020-08-10/toggle-collapsed-by-defau...
Comment #4
markhalliwell