Hi everyone,
I'm currently struggling to understand how to properly set up the off-canvas menu widget. Specifically, I need to know which tags to use and where to place them to make the menu indexable for mobile.
Here's what I'm trying to achieve: I want to create an off-canvas menu exclusively for mobile devices. To do this, I’ve hidden the desktop menu for mobile/tablet views. In the header, I inserted a container that includes a hamburger icon (to open the off-canvas menu). Within the same container, I placed the off-canvas widget, and inside that, I added all the elements of a mobile menu, such as navigation links, text, and a close icon. I’ve set the opening/closing commands for the widget, and everything seems to be functioning well on a visual level.
Now, my main concern is making this off-canvas menu crawlable by search engines. The question is: Which tags do I need to add, and where should I place them for SEO purposes?
I've heard conflicting advice:
- Some say I need to wrap everything inside the off-canvas menu with a
<nav>
tag. - Others suggest using the
<nav>
tag only within the menu widget itself. - Some advise placing it inside the settings for the widget title.
How exactly does indexing work in this case? What’s the best way to ensure that search engines can properly crawl and index this off-canvas menu?
Any advice would be greatly appreciated!
Thanks in advance to anyone who can help.