Skip to content

Commit

Permalink
fixing <nav> accessibility issue - putting it outside the <header>
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdavidmills committed Jan 20, 2017
1 parent 3b63adf commit d8568d8
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 61 deletions.
27 changes: 14 additions & 13 deletions accessibility/assessment-finished/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@
<body>
<header>
<h1>Welcome to our wildlife website</h1>
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Blog</a></li>
</ul>

<form class="search">
<input type="search" name="q" placeholder="Search query" aria-label="Search through site content">
<input type="submit" value="Go!">
</form>
</nav>
</header>

<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Blog</a></li>
</ul>

<form class="search">
<input type="search" name="q" placeholder="Search query" aria-label="Search through site content">
<input type="submit" value="Go!">
</form>
</nav>

<main>
<article>
<h2>The trouble with Bears</h2>
Expand Down
5 changes: 1 addition & 4 deletions accessibility/assessment-finished/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ p, li, table {

/* || header layout */

header {
margin-bottom: 10px;
}

nav, article, footer, .secondary {
background-color: white;
}
Expand All @@ -72,6 +68,7 @@ nav {
background-color: ff80ff;
display: flex;
padding: 1% 0;
margin-bottom: 10px;
}

nav ul {
Expand Down
25 changes: 13 additions & 12 deletions accessibility/assessment-start/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@
<body>
<div class="header">
<font size="7">Welcome to our wildlife website</font>
<div class="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Blog</a></li>
</ul>
</div>

<form class="search">
<input type="search" name="q" placeholder="Search query">
<input type="submit" value="Go!">
</form>
</div>
<div class="nav">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Blog</a></li>
</ul>

<form class="search">
<input type="search" name="q" placeholder="Search query">
<input type="submit" value="Go!">
</form>
</div>

<main>
Expand Down
5 changes: 1 addition & 4 deletions accessibility/assessment-start/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ p, li, table {

/* || header layout */

header {
margin-bottom: 10px;
}

div[class="nav"], article, footer, .secondary {
background-color: green;
}
Expand All @@ -72,6 +68,7 @@ div[class="nav"] {
background-color: ff80ff;
display: flex;
padding: 1% 0;
margin-bottom: 10px;
}

div[class="nav"] ul {
Expand Down
2 changes: 1 addition & 1 deletion css/introduction-to-css/how-css-works/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<h1>Hello World!</h1>
<p>This is my first CSS example</p>
</body>
</html>
</html>
32 changes: 15 additions & 17 deletions html/introduction-to-html/document_and_website_structure/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,23 @@

<header>
<h1>Header</h1>
</header>

<!-- Even is it's not mandatory, it's common practice to put the main navigation menu within the main header -->
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>

<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Our team</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
</ul>
<!-- A Search form is another commmon non-linear way to navigate through a website. -->

<!-- A Search form is another commmong non-linear way to navigate through a website. -->

<form>
<input type="search" name="q" placeholder="Search query">
<input type="submit" value="Go!">
</form>
</nav>
</header>
<form>
<input type="search" name="q" placeholder="Search query">
<input type="submit" value="Go!">
</form>
</nav>

<!-- Here is our page's main content -->
<main>
Expand Down Expand Up @@ -82,4 +80,4 @@ <h2>Related</h2>
</footer>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ p, li {

/* || header layout */

header {
margin-bottom: 10px;
}

nav, article, aside, footer {
background-color: white;
padding: 1%;
Expand All @@ -63,6 +59,7 @@ nav {
height: 50px;
background-color: ff80ff;
display: flex;
margin-bottom: 10px;
}

nav ul {
Expand Down Expand Up @@ -101,15 +98,15 @@ input {

input[type="search"] {
flex: 3;
}
}

input[type="submit"] {
flex: 1;
margin-left: 1rem;
background: #333;
border: 0;
color: white;
}
color: white;
}

/* || main layout */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
<h1>Extra video features example</h1>

<video controls width="400" height="400"
loop muted
loop muted preload="auto"
poster="poster.png">
<source src="rabbit320.mp4" type="video/mp4">
<source src="rabbit320.webm" type="video/webm">
<p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.mp4">link to the video</a> instead.</p>
<p>Your browser doesn't support HTML5 video. Here is a <a href="rabbit320.mp4">link to the video</a> instead.</p>
</video>
</body>
</html>
</html>

0 comments on commit d8568d8

Please sign in to comment.