Skip to content

Commit

Permalink
Footer and search updates (#157)
Browse files Browse the repository at this point in the history
* removal of title attribute on footer links

titles should only be used if a link's visible text does not appropriately describe the destination of the link.  

the titles that were removed were merely duplicates of the visible text, so there was no benefit in keeping them.

* Update searchform.php

role="search" can not be placed on a ```<form>``` element, as it will overwrite the form's inherent role.  Instead, the search role should be applied to a ```<div>``` that wraps all the elements that make up the search component, within the ```<form>```.

Inputs should always have an a label associated with them. To rectify this, I've added an ```aria-label="Search:" to stand in for the label element.  

Removed the ```role="button"``` from the submit button, as it's redundant to the inherent semantics of the button element.
  • Loading branch information
scottaohara authored and oriSomething committed Nov 27, 2016
1 parent ce78d01 commit 99eb037
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/footer.php
Expand Up @@ -4,7 +4,7 @@
<!-- copyright -->
<p class="copyright">
&copy; <?php echo date('Y'); ?> Copyright <?php bloginfo('name'); ?>. <?php _e('Powered by', 'html5blank'); ?>
<a href="//wordpress.org" title="WordPress">WordPress</a> &amp; <a href="//html5blank.com" title="HTML5 Blank">HTML5 Blank</a>.
<a href="//wordpress.org">WordPress</a> &amp; <a href="//html5blank.com">HTML5 Blank</a>.
</p>
<!-- /copyright -->

Expand Down
8 changes: 5 additions & 3 deletions src/searchform.php
@@ -1,6 +1,8 @@
<!-- search -->
<form class="search" method="get" action="<?php echo home_url(); ?>" role="search">
<input class="search-input" type="search" name="s" placeholder="<?php _e( 'To search, type and hit enter.', 'html5blank' ); ?>">
<button class="search-submit" type="submit" role="button"><?php _e( 'Search', 'html5blank' ); ?></button>
<form class="search" method="get" action="<?php echo home_url(); ?>">
<div role="search">
<input class="search-input" type="search" name="s" aria-label="Search site for:" placeholder="<?php _e( 'To search, type and hit enter.', 'html5blank' ); ?>">
<button class="search-submit" type="submit"><?php _e( 'Search', 'html5blank' ); ?></button>
</div>
</form>
<!-- /search -->

0 comments on commit 99eb037

Please sign in to comment.