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

a11y improvements on primary navigation menu toggle #459

Merged
merged 2 commits into from
Apr 27, 2014
Merged

a11y improvements on primary navigation menu toggle #459

merged 2 commits into from
Apr 27, 2014

Conversation

philiparthurmoore
Copy link
Collaborator

See #438. Also see https://core.trac.wordpress.org/ticket/27147.

Minor issue: before the change, there was no styling on the menu toggle. After the change, the menu toggle takes on the styles for buttons defined around https://github.com/Automattic/_s/blob/master/style.css#L256.

Primary Menu

This is a matter of taste that I have no strong opinion about—removing all styles on the menu toggle or leaving the button styles intact. I also added the word "Primary" into the menu. This is also a matter of preference, but if it's accepted then we'll need to update the POT file for the project.

@davidakennedy
Copy link
Contributor

Just wanted to say that from an accessibility perspective, this is solid and improves things quite a bit. Thanks @philiparthurmoore for the PR.

@obenland
Copy link
Member

After the change, the menu toggle takes on the styles for buttons defined around

I don't think that is a big deal, after all it is a button. We even named the JavaScript variable button when it was still an h1 element. But it (possibly) adds to the list of things that authors have to tear down before building up. Even if its just adding a :not(.menu-toggle) to the CSS button selector.

I don't feel strongly about going with "Primary Menu" over "Menu". It is more consistent with the theme location and less arbitrary though.

Nice PR, I expected that more changes would have been necessary. Pleasant surprise.

@philiparthurmoore
Copy link
Collaborator Author

I overlooked something.

Right now, .menu-toggle has cursor: pointer; on it, but if this PR is accepted then that rule will become redundant, as cursor: pointer; is already defined for all button elements and input elements of type button. I think that I should gut cursor: pointer; from .menu-toggle.

With regard to tearing down before building up, _s itself uses a fairly heavy-handed reset for all elements, so it's mostly a decision between a) resetting .menu-toggle explicitly or b) letting theme authors code in their own overrides for .menu-toggle against the button styles for _s. I'm okay with the second approach-all this resetting and resetting feels quite aggressive. But I'm also fine with the first; can't be bothered to fight either way.

What do you think?

@obenland
Copy link
Member

I think that I should gut cursor: pointer; from .menu-toggle.

You can continue to commit to your menu-a11y branch. All subsequent commits will show up in this PR.

I'm okay with the second approach[…]

Me too.

@philiparthurmoore
Copy link
Collaborator Author

Okay. I think we're good to go.

philiparthurmoore added a commit that referenced this pull request Apr 27, 2014
a11y improvements on primary navigation menu toggle
@philiparthurmoore philiparthurmoore merged commit 53f62fa into Automattic:master Apr 27, 2014
@philiparthurmoore philiparthurmoore deleted the menu-a11y branch April 27, 2014 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants