Index: wp-content/themes/twentyfourteen/js/functions.js
===================================================================
--- wp-content/themes/twentyfourteen/js/functions.js	(revision 31769)
+++ wp-content/themes/twentyfourteen/js/functions.js	(working copy)
@@ -7,22 +7,20 @@
  */
 ( function( $ ) {
 	var body    = $( 'body' ),
-		_window = $( window );
+		_window = $( window ), nav, button, menu, secondary;
 
+	nav = $( '#primary-navigation' );
+	button = nav.find( '.menu-toggle' );
+	menu = nav.find( '.nav-menu' );
+	secondary = $( '#secondary' );
+
 	// Enable menu toggle for small screens.
 	( function() {
-		var nav = $( '#primary-navigation' ), button, menu;
-		if ( ! nav ) {
+		if ( ! nav || ! button ) {
 			return;
 		}
 
-		button = nav.find( '.menu-toggle' );
-		if ( ! button ) {
-			return;
-		}
-
 		// Hide button if menu is missing or empty.
-		menu = nav.find( '.nav-menu' );
 		if ( ! menu || ! menu.children().length ) {
 			button.hide();
 			return;
@@ -109,6 +107,25 @@
 		} );
 	} );
 
+	// Add or remove ARIA attributes.
+	function onResizeARIA() {
+		if ( 781 > _window.width() ) {
+			button.attr( 'aria-expanded', 'false' );
+			secondary.attr( 'aria-expanded', 'false' );
+			button.attr( 'aria-controls', 'secondary' );
+		} else {
+			button.removeAttr( 'aria-expanded' );
+			secondary.removeAttr( 'aria-expanded' );
+			button.removeAttr( 'aria-controls' );
+		}
+	}
+
+	_window
+		.on( 'load.twentyfourteen', onResizeARIA )
+		.on( 'resize.twentyfourteen', function() {
+			onResizeARIA();
+	} );
+
 	_window.load( function() {
 		// Arrange footer widgets vertically.
 		if ( $.isFunction( $.fn.masonry ) ) {
