Skip to content

Commit 933c294

Browse files
updated jquery plugin so aria-label and aria-labelledby are copied to the search box correctly
1 parent 4afd715 commit 933c294

8 files changed

+14
-13
lines changed

coffee/chosen.jquery.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ class Chosen extends AbstractChosen
127127
set_aria_labels: ->
128128
@search_field.attr "aria-owns", @search_results.attr "id"
129129
if @form_field.attributes["aria-label"]
130-
@search_field.attr "aria-label", @form_field.attributes["aria-label"]
130+
@search_field.attr "aria-label", @form_field.attr "aria-label"
131131
if @form_field.attributes["aria-labelledby"]
132-
@search_field.attr "aria-labelledby", @form_field.attributes["aria-labelledby"]
132+
@search_field.attr "aria-labelledby", @form_field.attr "aria-labelledby"
133133
else if Object.prototype.hasOwnProperty.call(@form_field,'labels') && @form_field.labels.length
134134
labelledbyList = ""
135135
for label, i in @form_field.labels

docs/chosen.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Chosen, a Select Box Enhancer for jQuery and Prototype
33
Version 2.2.1
44
Full source at https://github.com/jjj/chosen
5-
Copyright (c) 2011-2022 JJJ
5+
Copyright (c) 2011-2023 JJJ
66
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
77
This file is generated by `grunt build`, do not edit it by hand.
88
*/

docs/chosen.jquery.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Chosen, a Select Box Enhancer for jQuery and Prototype
33
Version 2.2.1
44
Full source at https://github.com/jjj/chosen
5-
Copyright (c) 2011-2022 JJJ
5+
Copyright (c) 2011-2023 JJJ
66
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
77
This file is generated by `grunt build`, do not edit it by hand.
88
*/
@@ -1153,9 +1153,9 @@ This file is generated by `grunt build`, do not edit it by hand.
11531153
var i, j, label, labelledbyList, len, ref;
11541154
this.search_field.attr("aria-owns", this.search_results.attr("id"));
11551155
if (this.form_field.attributes["aria-label"]) {
1156-
this.search_field.attr("aria-label", this.form_field.attributes["aria-label"]);
1156+
this.search_field.attr("aria-label", this.form_field.attr("aria-label"));
11571157
if (this.form_field.attributes["aria-labelledby"]) {
1158-
return this.search_field.attr("aria-labelledby", this.form_field.attributes["aria-labelledby"]);
1158+
return this.search_field.attr("aria-labelledby", this.form_field.attr("aria-labelledby"));
11591159
}
11601160
} else if (Object.prototype.hasOwnProperty.call(this.form_field, 'labels') && this.form_field.labels.length) {
11611161
labelledbyList = "";

docs/chosen.jquery.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/chosen.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/chosen.proto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Chosen, a Select Box Enhancer for jQuery and Prototype
33
Version 2.2.1
44
Full source at https://github.com/jjj/chosen
5-
Copyright (c) 2011-2022 JJJ
5+
Copyright (c) 2011-2023 JJJ
66
MIT License, https://github.com/jjj/chosen/blob/master/LICENSE.md
77
This file is generated by `grunt build`, do not edit it by hand.
88
*/

docs/chosen.proto.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

+3-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)