Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the navigation block content available when JavaScript is disabled. #69363

Open
3 of 6 tasks
carolinan opened this issue Feb 28, 2025 · 4 comments
Open
3 of 6 tasks
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Description

Description

I am copying this from a Trac ticket that was opened about the menu in Twenty Twenty-Four:
https://core.trac.wordpress.org/ticket/63031

The reporter's clients needs to browse with JavaScript disabled, but the navigation blocks mobile menu does not work without JavaScript.

I understand that the editors require JavaScript and that the workaround for that is to install the classic editor plugin.
I also recommended the user to change to any theme that is specifically built to work without JavaScript.

But perhaps the navigation block can still be improved to have a noscript fallback.

Expected behaviour

I expect the menu content to be available with reduced functionality.

Actual behaviour

The menu does not open.

Step-by-step reproduction instructions

Place a navigation block with the mobile menu option enabled. Save.
Go to to the front of the site.
Disable JavaScript -How you do this will depend on the browser.
Try to open the menu.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@carolinan carolinan added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block labels Feb 28, 2025
@maltfield
Copy link

maltfield commented Feb 28, 2025

Can someone please indicate which file in this repo has the "navigation block" code?

@maltfield

This comment has been minimized.

@carolinan

This comment has been minimized.

@carolinan
Copy link
Contributor Author

@maltfield I believe a noscript element would need to go in here https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/navigation/index.php

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

2 participants