ruby-changes:32138
From: drbrain <ko1@a...>
Date: Sun, 15 Dec 2013 07:09:41 +0900 (JST)
Subject: [ruby-changes:32138] drbrain:r44217 (trunk): * lib/rdoc: Update to RDoc master 263a9e5. This improves the
drbrain 2013-12-15 07:09:35 +0900 (Sun, 15 Dec 2013) New Revision: 44217 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44217 Log: * lib/rdoc: Update to RDoc master 263a9e5. This improves the accessibility of the search box. Modified files: trunk/ChangeLog trunk/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml trunk/lib/rdoc/generator/template/darkfish/js/search.js trunk/lib/rdoc.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 44216) +++ ChangeLog (revision 44217) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun Dec 15 07:09:28 2013 Eric Hodel <drbrain@s...> + + * lib/rdoc: Update to RDoc master 263a9e5. This improves the + accessibility of the search box. + Sun Dec 15 05:28:35 2013 Eric Hodel <drbrain@s...> * lib/rubygems/basic_specification.rb: Update to RubyGems master Index: lib/rdoc.rb =================================================================== --- lib/rdoc.rb (revision 44216) +++ lib/rdoc.rb (revision 44217) @@ -64,7 +64,7 @@ module RDoc https://github.com/ruby/ruby/blob/trunk/lib/rdoc.rb#L64 ## # RDoc version you are using - VERSION = '4.1.0.preview.3' + VERSION = '4.1.0.rc.1' ## # Method visibilities Index: lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml =================================================================== --- lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml (revision 44216) +++ lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml (revision 44217) @@ -3,13 +3,12 @@ https://github.com/ruby/ruby/blob/trunk/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml#L3 <div id="search-field-wrapper"> <input id="search-field" role="combobox" aria-label="Search" aria-autocomplete="list" aria-controls="search-results" - type="text" name="search" placeholder="Search" + type="text" name="search" placeholder="Search" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"> </div> <ul id="search-results" aria-label="Search Results" aria-busy="false" aria-expanded="false" - aria-atomic="false" aria-live="polite" - aria-relevant="all" class="initially-hidden"></ul> + aria-atomic="false" class="initially-hidden"></ul> </form> </div> Index: lib/rdoc/generator/template/darkfish/js/search.js =================================================================== --- lib/rdoc/generator/template/darkfish/js/search.js (revision 44216) +++ lib/rdoc/generator/template/darkfish/js/search.js (revision 44217) @@ -14,7 +14,12 @@ Search.prototype = $.extend({}, Navigati https://github.com/ruby/ruby/blob/trunk/lib/rdoc/generator/template/darkfish/js/search.js#L14 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({}, Navigati https://github.com/ruby/ruby/blob/trunk/lib/rdoc/generator/template/darkfish/js/search.js#L87 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/