[wp-trac] [WordPress Trac] #21562: Twenty Twelve: improve navigation to be mobile-first and not rely on JS for hiding and showing

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 24 16:39:04 UTC 2012


#21562: Twenty Twelve: improve navigation to be mobile-first and not rely on JS for
hiding and showing
---------------------------+------------------
 Reporter:  cfinke         |       Owner:
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  3.5
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |
---------------------------+------------------

Comment (by lancewillett):

 Replying to [comment:34 azaozz]:
 > For the JS addClass and removeClass:
 > function removeClass(element, name) {
 > function addClass(element, name) {

 I think that's probably overkill. Might as well just go back to using
 jQuery methods at that point. :)

 > Perhaps consider making the menu fully accessible, instead of using
 `display: none` and `display: block`, much better to use `top: -10000em`
 to hide from the viewport but not from screen readers and `top: 0` to show
 (the submenus are already `position: absolute` anyway). Then use :focus as
 well as :hover to show them.

 I like this—but in the case of the small mobile menu the hover and focus
 pseudo classes don't apply since this display mode is for touch devices
 primarily. The submenus are not positioned in this display (they are in >
 600 pixels only).

 In the "large" display of the menu the top-level is always visible.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21562#comment:39>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list