diff --git a/ChangeLog b/ChangeLog index 28e4d09de0..770e467c6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun Dec 15 07:09:28 2013 Eric Hodel + + * lib/rdoc: Update to RDoc master 263a9e5. This improves the + accessibility of the search box. + Sun Dec 15 05:28:35 2013 Eric Hodel * lib/rubygems/basic_specification.rb: Update to RubyGems master diff --git a/lib/rdoc.rb b/lib/rdoc.rb index 02be64f232..1406eb4d14 100644 --- a/lib/rdoc.rb +++ b/lib/rdoc.rb @@ -64,7 +64,7 @@ module RDoc ## # RDoc version you are using - VERSION = '4.1.0.preview.3' + VERSION = '4.1.0.rc.1' ## # Method visibilities diff --git a/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml b/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml index 4c1e1f7cc3..9c49b31376 100644 --- a/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +++ b/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml @@ -3,13 +3,12 @@
+ aria-atomic="false" class="initially-hidden"> diff --git a/lib/rdoc/generator/template/darkfish/js/search.js b/lib/rdoc/generator/template/darkfish/js/search.js index 563ed7e54e..60ac295e6c 100644 --- a/lib/rdoc/generator/template/darkfish/js/search.js +++ b/lib/rdoc/generator/template/darkfish/js/search.js @@ -14,7 +14,12 @@ Search.prototype = $.extend({}, Navigation, new function() { this.init = function() { var _this = this; - var observer = function() { + var observer = function(e) { + switch(e.originalEvent.keyCode) { + case 38: // Event.KEY_UP + case 40: // Event.KEY_DOWN + return; + } _this.search(_this.$input[0].value); }; this.$input.keyup(observer); @@ -82,6 +87,8 @@ Search.prototype = $.extend({}, Navigation, new function() { this.$input.attr('aria-activedescendant', $next.attr('id')); this.scrollIntoView($next[0], this.$view[0]); this.$current = $next; + this.$input.val($next[0].firstChild.firstChild.text); + this.$input.select(); } return true; }