• Resolved spencerjakobgm

    (@spencerjakobgm)


    Very usefull plugin, as default navigation block lacks this functionality.

    Would be nice, if the aria-hidden attribute also gets set to true like with close button and it also closes at click on anchor links, this is also missing at default nav block.

    maybe its better to use
    document.getElementsByClassName(‘wp-block-navigation__responsive-container-close’).item(0).click()

    for closing instead of setting the classes of the modal and html

    Regards spencer

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Matthias Bathke

    (@matthiasbathke)

    Hi spencer,

    thank you for your good feedback.

    With regard to “Close on Anchor”, there are currently two reasons why this plugin should not be used:

    1. It would soften the single purpose approach of the plugin, which might be worth considering.
    2. According to my tests, the menu is already closed when clicking on an anchor, possibly this is already part of the original script of the navigation block (I have not checked this).

    The suggestion to simulate a close click is very interesting, I’m just not sure if this would be best practice. I implemented the aria-hidden switch first (v1.0.01 release), but I’m keeping your approach in mind as a possibility for the future. Thank you very much!

    I look forward to your feedback.

    Kind regards,

    Matthias

    Plugin Contributor Matthias Bathke

    (@matthiasbathke)

    Hi spencer,

    I haven’t heard anything more from you so far, so I hope your problem has been fixed by the update and mark this topic as resolved.

    Kind regards,

    Matthias

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘aria-hidden attribute remains false after close’ is closed to new replies.