Changeset 44426
- Timestamp:
- 01/07/2019 03:59:04 PM (6 years ago)
- Location:
- branches/5.0
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0
-
branches/5.0/src/wp-content/themes/twentynineteen/inc/template-functions.php
r44193 r44426 204 204 205 205 $nav_menu .= '<div class="main-menu-more">'; 206 $nav_menu .= '<ul class="main-menu" tabindex="0">';206 $nav_menu .= '<ul class="main-menu">'; 207 207 $nav_menu .= '<li class="menu-item menu-item-has-children">'; 208 $nav_menu .= '< a href="#" class="screen-reader-text" aria-label="More" aria-haspopup="true" aria-expanded="false">' . esc_html__( 'More', 'twentynineteen' ) . '</a>';209 $nav_menu .= '<span class="s ubmenu-expand main-menu-more-toggle is-empty" tabindex="-1">';208 $nav_menu .= '<>'; 209 $nav_menu .= '<span class="s>'; 210 210 $nav_menu .= twentynineteen_get_icon_svg( 'arrow_drop_down_ellipsis' ); 211 $nav_menu .= '</ span>';211 $nav_menu .= '</n>'; 212 212 $nav_menu .= '<ul class="sub-menu hidden-links">'; 213 213 $nav_menu .= '<li id="menu-item--1" class="mobile-parent-nav-menu-item menu-item--1">'; 214 $nav_menu .= '< span class="menu-item-link-return">';214 $nav_menu .= '<n class="menu-item-link-return">'; 215 215 $nav_menu .= twentynineteen_get_icon_svg( 'chevron_left' ); 216 216 $nav_menu .= esc_html__( 'Back', 'twentynineteen' ); 217 $nav_menu .= '</ span>';217 $nav_menu .= '</n>'; 218 218 $nav_menu .= '</li>'; 219 219 $nav_menu .= '</ul>'; … … 270 270 // @todo Only do this for nested submenus? If on a first-level submenu, then really the link could be "#" since the desire is to remove the target entirely. 271 271 $link = sprintf( 272 '< span class="menu-item-link-return" tabindex="-1">%s',272 '<n class="menu-item-link-return" tabindex="-1">%s', 273 273 twentynineteen_get_icon_svg( 'chevron_left', 24 ) 274 274 ); 275 275 276 // replace opening <a> with < span>276 // replace opening <a> with <n> 277 277 $output = preg_replace( 278 278 '/<a\s.*?>/', … … 282 282 ); 283 283 284 // replace closing </a> with </ span>284 // replace closing </a> with </n> 285 285 $output = preg_replace( 286 286 '#</a>#i', 287 '</ span>',287 '</n>', 288 288 $output, 289 289 1 // Limit. … … 296 296 297 297 $output .= sprintf( 298 '< span class="submenu-expand" tabindex="-1">%s</span>',298 '<n>', 299 299 $icon 300 300 ); -
branches/5.0/src/wp-content/themes/twentynineteen/js/touch-keyboard-navigation.js
r44357 r44426 113 113 114 114 // Update aria-expanded state 115 toggleAriaExpandedState( currentSubMenu .previousSibling);115 toggleAriaExpandedState( currentSubMenu ); 116 116 } 117 117 … … 231 231 232 232 // Check if child of .submenu-expand is touched 233 } else if ( null != getCurrentParent( event.target, '.submenu-expand' ) && getCurrentParent( event.target, '.submenu-expand' ).matches( '.submenu-expand' ) ) { 233 } else if ( null != getCurrentParent( event.target, '.submenu-expand' ) && 234 getCurrentParent( event.target, '.submenu-expand' ).matches( '.submenu-expand' ) ) { 234 235 openSubMenu( getCurrentParent( event.target, '.submenu-expand' ) ); 235 236 … … 255 256 // Prevent default mouse events 256 257 event.preventDefault(); 258 257 259 } else if ( 258 260 event.target.matches('.submenu-expand') || -
branches/5.0/src/wp-content/themes/twentynineteen/sass/navigation/_menu-main-navigation.scss
r43909 r44426 12 12 > div { 13 13 display: inline; 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 14 47 } 15 48 … … 183 216 } 184 217 218 219 220 221 222 223 224 185 225 > a:empty { 186 226 display: none; -
branches/5.0/src/wp-content/themes/twentynineteen/style-rtl.css
r44424 r44426 1028 1028 display: block; 1029 1029 margin-top: 0.25rem; 1030 1030 1031 /* 1031 1032 * Sub-menu styles … … 1050 1051 } 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1052 1083 .main-navigation .main-menu { 1053 1084 display: inline-block; … … 1205 1236 .main-navigation .sub-menu > li > .menu-item-link-return:focus:after { 1206 1237 background: #005177; 1238 1239 1240 1241 1242 1243 1244 1207 1245 } 1208 1246 -
branches/5.0/src/wp-content/themes/twentynineteen/style.css
r44424 r44426 1028 1028 display: block; 1029 1029 margin-top: 0.25rem; 1030 1030 1031 /* 1031 1032 * Sub-menu styles … … 1050 1051 } 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1052 1083 .main-navigation .main-menu { 1053 1084 display: inline-block; … … 1205 1236 .main-navigation .sub-menu > li > .menu-item-link-return:focus:after { 1206 1237 background: #005177; 1238 1239 1240 1241 1242 1243 1244 1207 1245 } 1208 1246 -
branches/5.0/src/wp-content/themes/twentynineteen/template-parts/header/site-branding.php
r43892 r44426 37 37 'theme_location' => 'menu-1', 38 38 'menu_class' => 'main-menu', 39 'items_wrap' => '<ul id="%1$s" class="%2$s" tabindex="0">%3$s</ul>',39 'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>', 40 40 ) 41 41 );
Note: See TracChangeset
for help on using the changeset viewer.