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

Enable JSON formatting of mobile/hamburger menu button #51314

Open
likethegoddess opened this issue Jun 8, 2023 · 3 comments
Open

Enable JSON formatting of mobile/hamburger menu button #51314

likethegoddess opened this issue Jun 8, 2023 · 3 comments
Labels
[Block] Navigation Affects the Navigation Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.

Comments

@likethegoddess
Copy link

What problem does this address?

The navigation block defaults to a 24px by 24px mobile/menu button in full site editing themes. A 24px square button is small it is hard to operate. It also needs to be changed to meet WCAG 2.1 AAA accessibility standards.

Currently, CSS is required to enlarge the button in full site editing themes.

What is your proposed solution?

Enable formatting of the mobile/hamburger menu button in JSON, including changing size.

@skorasaurus
Copy link
Member

Hi,

I agree; that is too small; I thought there was an issue about the size of the icon being too small but I can't find it at the moment.

Regarding customizing the formatting of the icon for navigation block, that has been reported in #37930

@likethegoddess
Copy link
Author

Thanks, @skorasaurus, I looked for an issue about the icon being too small too. Wasn't able to find it. I would be happy to open that issue too if it doesn't already exist.

@t-hamano t-hamano added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Block] Navigation Affects the Navigation Block labels Jun 9, 2023
@justintadlock
Copy link
Contributor

You can customize this via theme.json (as CSS) (if anyone needs to in the meantime):

{
	"styles": {
		"blocks": {
			"core/navigation": {
				"css": "& .wp-block-navigation__responsive-container-close svg { width: 30px; height: 30px; } & .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }"
			}
		}
	}
}

Agreed that it'd be nice to have a way to specifically customize its design through dedicated properties.

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 [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants