Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#21697 closed defect (bug) (wontfix)

Twenty Twelve: Small navigation not showing with JS off

Reported by: jayjdk's profile Jayjdk Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

When a user browses with javascript turned off and with a browser width < 600px, there's no way to see the navigation.

My suggestion would be to add a no-js class to the html/body tag as the dashboard does.

When use CSS to show the navigation and hide the button:

.no-js .main-navigation ul.nav-menu {
   display: block;
}

.no-js .menu-toggle {
  display: none;
}

The code used in the dashboard to do it is:

document.body.className = document.body.className.replace('no-js','js');

Attachments (2)

twentytwelve_navigation_nojs.patch (1.3 KB) - added by Jayjdk 14 years ago.
Adds no-js to the body tag
21697.diff (2.0 KB) - added by lancewillett 14 years ago.
Refreshed patch with a bit of commenting

Download all attachments as: .zip

Change History (9)

@Jayjdk
14 years ago

Adds no-js to the body tag

#1 @lancewillett
14 years ago

  • Milestone changed from Awaiting Review to 3.5

Great suggestion, thanks for the report and patch.

#2 @lancewillett
14 years ago

I'm going to work on this, but probably in a week or two after we release to WP.com and Extend and let the dust settle there a bit.

@lancewillett
14 years ago

Refreshed patch with a bit of commenting

#3 @lancewillett
14 years ago

Discussing today in IRC, seems on one hand to be overkill for a theme to be doing this kind of checking.

But, if the amount of visitors affected ( < 600px and no JS ) is an appreciable and quantifiable amount, I can see the argument to include it.

Not sure if those same user agents (mobile devices) would also have CSS support.

#4 follow-up: @Jayjdk
14 years ago

Yeah, you're properly right; it will affect very few users. Hopefully we'll be able to detect it with CSS in the future.

Should this ticket be closed or stay open?

#5 in reply to: ↑ 4 @lancewillett
14 years ago

Replying to Jayjdk:

Yeah, you're properly right; it will affect very few users. Hopefully we'll be able to detect it with CSS in the future.

Should this ticket be closed or stay open?

Let's leave it open, Nacin wanted to do some more research on it. I think we're mostly leaning in the close as wontfix direction.

#6 @lancewillett
14 years ago

  • Cc nacin added

@nacin — Did you have a chance to look at this one again?

#7 @lancewillett
14 years ago

  • Milestone 3.5 deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Feel free to re-open later if we need to take another look at this.

Note: See TracTickets for help on using tickets.