Skip to content
Permalink
Browse files

Merge pull request #354 from secretfader/aria-label

Add aria hints where labels were missing or unclear
  • Loading branch information
QuietMisdreavus committed Aug 8, 2019
2 parents f01dedd + 54310e4 commit 3bebf1c79bcda76cf8536bb536135f633b6b2ff2
Showing with 6 additions and 6 deletions.
  1. +3 −3 templates/navigation.hbs
  2. +2 −2 templates/navigation_rustdoc.hbs
  3. +1 −1 templates/releases.hbs
@@ -1,11 +1,11 @@
<div class="nav-container">
<div class="container">
<div class="pure-menu pure-menu-horizontal">
<div class="pure-menu pure-menu-horizontal" role="navigation" aria-label="Main navigation">
<form action="/releases/search" method="GET" class="landing-search-form-nav">
{{#unless varsb.show_search_form}}
<input class="search-input-nav" name="query" type="text" placeholder="Find crate"{{#if varss.search_query}} value="{{varss.search_query}}"{{/if}}>
<input class="search-input-nav" name="query" type="text" aria-label="Find crate by search query" placeholder="Find crate"{{#if varss.search_query}} value="{{varss.search_query}}"{{/if}}>
{{/unless}}
<a href="/" class="pure-menu-heading pure-menu-link"><i class="fa fa-cubes fa-fw"></i> Docs.rs</a>
<a href="/" class="pure-menu-heading pure-menu-link" aria-label="Docs.rs"><i class="fa fa-cubes fa-fw"></i> Docs.rs</a>
<ul class="pure-menu-list">
<li class="pure-menu-item"><a href="/releases" class="pure-menu-link">Releases</a></li>
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
@@ -3,7 +3,7 @@
<div class="pure-menu pure-menu-horizontal">
<form action="/releases/search" method="GET" class="landing-search-form-nav">
{{#unless varsb.show_search_form}}
<input class="search-input-nav" name="query" tabindex="-1" type="text" placeholder="Find crate"{{#if varss.search_query}} value="{{varss.search_query}}"{{/if}}>
<input class="search-input-nav" name="query" aria-label="Find crate by search query" tabindex="-1" type="text" placeholder="Find crate"{{#if varss.search_query}} value="{{varss.search_query}}"{{/if}}>
{{/unless}}
<a href="/" class="pure-menu-heading pure-menu-link"><i class="fa fa-cubes fa-fw"></i><span class="title"> Docs.rs</span></a>
{{#with content.crate_details}}
@@ -93,7 +93,7 @@
<a href="/crate/{{name}}/{{version}}/source/" title="Browse source of {{name}}-{{version}}" class="pure-menu-link{{#if ../../varsb.package_source_tab}} pure-menu-active{{/if}}"><i class="fa fa-fw fa-folder-open-o"></i><span class="title"> Source</span></a>
</li>
<li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
<a href="#" class="pure-menu-link"><i class="fa fa-fw fa-gears"></i><span class="title"> Platform</span></a>
<a href="#" class="pure-menu-link" aria-label="Platform"><i class="fa fa-fw fa-gears"></i><span class="title"> Platform</span></a>
<ul class="pure-menu-children">
{{#each doc_targets}}
<li class="pure-menu-item"><a href="/{{../../content.crate_details.name}}/{{../../content.crate_details.version}}/{{this}}/{{../../content.crate_details.target_name}}/" class="pure-menu-link">{{this}}</a></li>
@@ -14,7 +14,7 @@
<h1 class="brand"><i class="fa fa-cubes fa-fw"></i> Docs.rs</h1>

<form action="/releases/search" method="GET" class="landing-search-form">
<div><input class="search-input" id="search" name="query" type="text" placeholder="Click or press 'S' to search" autofocus></div>
<div><input class="search-input" id="search" name="query" type="text" aria-label="Find crate by search query" placeholder="Click or press 'S' to search" autofocus></div>
<div class="buttons">
<button type="submit" class="pure-button pure-button-normal">Search</button>
<button type="submit" class="pure-button pure-button-normal" id="i-am-feeling-lucky-button">I'm Feeling Lucky</button>

0 comments on commit 3bebf1c

Please sign in to comment.
You can’t perform that action at this time.