Permalink
Browse files

Footer and search updates (#157)

* 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...
1 parent ce78d01 commit 99eb037af8431bbefeb99abb57fabe1f86753929 @scottaohara scottaohara committed with oriSomething Nov 27, 2016
Showing with 6 additions and 4 deletions.
  1. +1 −1 src/footer.php
  2. +5 −3 src/searchform.php
View
@@ -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 -->
View
@@ -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.