Skip to content

Commit

Permalink
Add role="button" to chosen-single class link
Browse files Browse the repository at this point in the history
  • Loading branch information
juanolalla committed Sep 25, 2023
1 parent 4afd715 commit fa1628c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class @Chosen extends AbstractChosen
super()

# HTML Templates
@single_temp = new Template('<a class="chosen-single chosen-default"><span>#{default}</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" /></div><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>')
@single_temp = new Template('<a class="chosen-single chosen-default" role="button"><span>#{default}</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" /></div><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>')
@multi_temp = new Template('<ul class="chosen-choices"><li class="search-field"><input type="text" value="#{default}" class="default" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>')
@no_results_temp = new Template('<li class="no-results">' + @results_none_found + ' "<span>#{terms}</span>"</li>')

Expand Down
2 changes: 1 addition & 1 deletion coffee/lib/abstract-chosen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ class AbstractChosen

get_single_html: ->
"""
<a class="chosen-single chosen-default">
<a class="chosen-single chosen-default" role="button">
<span>#{@default_text}</span>
<div><b></b></div>
</a>
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Chosen, a Select Box Enhancer for jQuery and Prototype
Version 2.2.1
Full source at https://github.com/jjj/chosen
Copyright (c) 2011-2022 JJJ
Copyright (c) 2011-2023 JJJ
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
Expand Down Expand Up @@ -897,7 +897,7 @@ This file is generated by `grunt build`, do not edit it by hand.
}

get_single_html() {
return `<a class="chosen-single chosen-default">
return `<a class="chosen-single chosen-default" role="button">
<span>${this.default_text}</span>
<div><b></b></div>
</a>
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.jquery.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/chosen.proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Chosen, a Select Box Enhancer for jQuery and Prototype
Version 2.2.1
Full source at https://github.com/jjj/chosen
Copyright (c) 2011-2022 JJJ
Copyright (c) 2011-2023 JJJ
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
This file is generated by `grunt build`, do not edit it by hand.
*/
Expand Down Expand Up @@ -897,7 +897,7 @@ This file is generated by `grunt build`, do not edit it by hand.
}

get_single_html() {
return `<a class="chosen-single chosen-default">
return `<a class="chosen-single chosen-default" role="button">
<span>${this.default_text}</span>
<div><b></b></div>
</a>
Expand Down Expand Up @@ -971,7 +971,7 @@ This file is generated by `grunt build`, do not edit it by hand.
set_default_values() {
super.set_default_values();
// HTML Templates
this.single_temp = new Template('<a class="chosen-single chosen-default"><span>#{default}</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" /></div><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>');
this.single_temp = new Template('<a class="chosen-single chosen-default" role="button"><span>#{default}</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" /></div><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>');
this.multi_temp = new Template('<ul class="chosen-choices"><li class="search-field"><input type="text" value="#{default}" class="default" autocomplete="off" aria-expanded="false" aria-haspopup="true" role="combobox" aria-autocomplete="list" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results" role="listbox" aria-busy="true"></ul></div>');
return this.no_results_temp = new Template('<li class="no-results">' + this.results_none_found + ' "<span>#{terms}</span>"</li>');
}
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.proto.min.js

Large diffs are not rendered by default.

0 comments on commit fa1628c

Please sign in to comment.