Skip to content

Commit

Permalink
Bug #9/ #17, JS to add author_name to facetious search [LACE][iet:4…
Browse files Browse the repository at this point in the history
…012852]

* Plus accessibility fixes - CSS + Javascript.
* IET-OU/oer-evidence-hub-org#54
  • Loading branch information
nfreear committed Oct 8, 2015
1 parent 997128f commit ca51e04
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
11 changes: 11 additions & 0 deletions css/iet-custom-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
}


::-webkit-input-placeholder {
color: #888;
}
::-moz-placeholder { /* Firefox 19+ */
color: #999;
}
:-ms-input-placeholder {
color: #999;
}


.X-test-site .site-header h1 a {
color: orange;
}
Expand Down
13 changes: 13 additions & 0 deletions js/facetious-hack.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,17 @@ jQuery(function ($) {
.empty()
.append('<button type="submit" class="facetious_submit_button">Search</button>');

// Inject author field.
$form
.find(".facetious_submit")
.before('<p class="facetious_author hack"><label for="f_an">Author</label>' +
' <input name="author_name" class="facetious_filter" id="f_an" placeholder="user-name" title="Example: \'rebeccaferguson\'"></p>');

/* Accessibility [a11y][Bug: #17]
*/
$form
.attr({ role: "search", "aria-label": "Filter evidence and projects" })
.find(".facetious_input_search")
.attr({ type: "search" });

});
5 changes: 3 additions & 2 deletions js/lace-javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
jQuery(function ($) {

var W = window
, C = W.console
, debug = W.location.search.match(/debug=1/)
, C = debug && W.console
, $body_class = $("#lace-js-body-class")
, has_cleanprint = W.WpCpCleanPrintPrintHtml || W.CleanPrintHtml
, $inject_cleanprint = $("body") //.search-results, body.single-hypothesis")
Expand Down Expand Up @@ -50,7 +51,7 @@ jQuery(function ($) {
$(".leaflet-bottom.leaflet-left").append($map_icon[0].outerHTML);
}

// Accessibility-related help [a11y][Bug: 17]
// Accessibility-related help [a11y][Bug: #17]
$(".nav-menu:first").before(
'<p class="lace-assistive-help lace-nav-help" tabindex="0" role="note">' +
'You can navigate the top level of the navigation using the left &amp; right arrow keys. Screen reader users can use ALT plus the left &amp; right arrows.' +
Expand Down

0 comments on commit ca51e04

Please sign in to comment.