Skip to content

Commit

Permalink
Removed invisible home link from main navigiation. Fixed navigation k…
Browse files Browse the repository at this point in the history
…eyboard preventDefault issue.
  • Loading branch information
kkoryaka committed Mar 13, 2019
1 parent d06b623 commit 9188764
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 18 deletions.
4 changes: 2 additions & 2 deletions js/cagov.core.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* CA State Template v5.5 - @version v5.5.2 - 3/5/2019
* CA State Template v5.5 - @version v5.5.2 - 3/13/2019
STYLES COMPILED FROM SOURCE (source/js) DO NOT MODIFY */
/*! modernizr (Custom Build) | MIT *
* https://modernizr.com/download/?-flexbox-setclasses !*/
Expand Down Expand Up @@ -15214,7 +15214,7 @@ limitations under the License.
case Keyboard.SPACE:
case Keyboard.ENTER:
if (isTopNavItem) {
event.preventDefault();
// event.preventDefault();
_clickHandler.call(that, event);
} else {
return true;
Expand Down
4 changes: 2 additions & 2 deletions js/cagov.core.min.js

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions sample/modules/nav-dev.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<!-- Megamenu dropdown -->
<nav id="navigation" class="main-navigation megadropdown off-canvas">
<ul id="nav_list" class="top-level-nav">
<li class="home-link nav-item">
<a href="/" class="first-level-link"><span id="nav_home_container" class="ca-gov-icon-home" aria-hidden="true"></span><span class="sr-only">Home</span></a>
</li>

<li class="nav-item">
<a href="/" class="first-level-link">Link 1</a>
<div class="sub-nav">
Expand Down
4 changes: 1 addition & 3 deletions sample/modules/nav-megamenu-orig.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

<nav id="navigation" class="main-navigation megadropdown original">
<ul id="nav_list" class="top-level-nav">
<li class="home-link nav-item">
<a href="/" class="first-level-link"><span id="nav_home_container" class="ca-gov-icon-home" aria-hidden="true"></span><span class="sr-only">Home</span></a>
</li>

<li class="nav-item active">
<a href="/sample/" class="first-level-link has-sub"><span class="ca-gov-icon-gears"></span>Examples</a>
<span class="mobile-control toggle-sub-nav closed"><span class="ca-gov-icon-menu-toggle-open" aria-hidden="true"></span><span class="sr-only">Sub Menu Toggle</span></span><div class="sub-nav">
Expand Down
1 change: 0 additions & 1 deletion sample/modules/nav-singlelevel-standard-mobile.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!-- Top Level Navigation Only -->
<nav id="navigation" class="main-navigation singlelevelnav auto-highlight no-icons">
<ul id="nav_list" class="top-level-nav">
<li class="home-link nav-item"><a href="/" class="first-level-link"><span id="nav_home_container" class="ca-gov-icon-home" aria-hidden="true"></span><span class="sr-only">Home</span></a></li>
<li class="nav-item"><a href="/sample/" class="first-level-link">Examples</a></li>
<li class="nav-item"><a href="/about.html" class="first-level-link">About</a></li>
<li class="nav-item"><a href="https://github.com/Office-of-Digital-Innovation" target="_blank" class="first-level-link">Download</a></li>
Expand Down
3 changes: 0 additions & 3 deletions sample/modules/nav-singlelevel.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<!-- Top Level Navigation Only -->
<nav id="navigation" class="main-navigation singlelevelnav auto-highlight">
<ul id="nav_list" class="top-level-nav">
<li class="home-link nav-item">
<a href="/" class="first-level-link"><span id="nav_home_container" class="ca-gov-icon-home" aria-hidden="true"></span>Home</a>
</li>
<li class="nav-item">
<a href="/sample/" class="first-level-link"><span class="ca-gov-icon-gears"></span>Examples</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion source/js/cagov/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ limitations under the License.
case Keyboard.SPACE:
case Keyboard.ENTER:
if (isTopNavItem) {
event.preventDefault();
// event.preventDefault();
_clickHandler.call(that, event);
} else {
return true;
Expand Down
3 changes: 0 additions & 3 deletions ssi/navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

<nav id="navigation" class="main-navigation megadropdown auto-highlight">
<ul id="nav_list" class="top-level-nav">
<li class="home-link nav-item">
<a href="/" class="first-level-link"><span id="nav_home_container" class="ca-gov-icon-home" aria-hidden="true"></span>Home</a>
</li>
<li class="nav-item">
<a href="/sample/" class="first-level-link"><span class="ca-gov-icon-gears"></span>Examples</a>
<div class="sub-nav">
Expand Down

0 comments on commit 9188764

Please sign in to comment.