question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Menu's children always wrapped in <nav /> making it hard to use as normal off-canvas widget

See original GitHub issue

Hey 😃

I’d like to use this for an off-canvas widget. However, the off-canvas should not contain a <nav /> but on the left a list of elements. And on the right there should be another off-canvas with various filters.

Similar to this: https://www.plattform-i40.de/I40/Navigation/Karte/SiteGlobals/Forms/Formulare/karte-anwendungsbeispiele-formular.html (Click on “LISTE” on the left, or “FILTEROPTIONEN” on the right) So there’s a map in the middle which has 2 off-canvas elements left and right that can be toggled.

Not sure this is possible or the best widget for this?

For one I’ve seen that all <Menu /> children are wrapped in a <nav />. This is something I would not want since the children are not a navigation.

https://github.com/negomi/react-burger-menu/blob/7e35a2d83b12b0e4132a7f459cbcd663610c7efe/src/menuFactory.js#L236-L259

I read https://github.com/negomi/react-burger-menu/issues/224#issuecomment-360362734 and thought of going down this way but I am not sure. Thanks for pointers, happy to contribute a PR if appropriate.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jnachtigallcommented, Aug 21, 2018

Is your concern about semantic accuracy?

Yes, this and accessibility (screens reader often have kind of “jump to nav” functionality.

I’d be open to adding a prop (itemListElement or something) and allowing you to pass in a tag name string (e.g. ‘div’) with the default as ‘nav’, which we could then use to construct that element.

Would that help?

I think so. Should be easy to add. I’ll try this. Thank you!

1reaction
negomicommented, Aug 21, 2018

Hey @jnachtigall,

Is your concern about semantic accuracy?

The menu was built with the navigation use case in mind, which is why we make that assumption, but it’s true that it’s just a sidebar and doesn’t have to be used for navigation at all.

I’d be open to adding a prop (itemListElement or something) and allowing you to pass in a tag name string (e.g. 'div') with the default as 'nav', which we could then use to construct that element.

Would that help?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Widget & Menu Positions - bootScore
bootScore has nine widgets and two menu positions. ... Use a navigation widget in Footer 1-3 for important informations instead. It has a...
Read more >
Elementor off canvas widget for menu and header - YouTube
The off-canvas widget provides you an opportunity to add unlimited content blocks in the header menu using Elementor elements.
Read more >
Off-canvas Menu in Elementor PRO - YouTube
Are you keen to know how easy it is to create the off-canvas menu with Elementor PRO?It takes very little effort to switch...
Read more >
Elementor Nav Menu: Powerful WordPress Menu Builder
Elementor Menu widget allows you to create professional menus in minutes, without having to edit CSS. Learn all about Elementor WordPress ...
Read more >
How to Create Off-Canvas Sliding Navigation Menu
This article will show you how to make a cool Sliding Navigation with Off-Page Canvas Effect. We will use CSS transition and animation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found