Skip to content

Commit

Permalink
updated jquery plugin so aria-label and aria-labelledby are copied to…
Browse files Browse the repository at this point in the history
… the search box correctly
  • Loading branch information
srook-sterling committed Feb 10, 2023
1 parent 4afd715 commit 933c294
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ class Chosen extends AbstractChosen
set_aria_labels: ->
@search_field.attr "aria-owns", @search_results.attr "id"
if @form_field.attributes["aria-label"]
@search_field.attr "aria-label", @form_field.attributes["aria-label"]
@search_field.attr "aria-label", @form_field.attr "aria-label"
if @form_field.attributes["aria-labelledby"]
@search_field.attr "aria-labelledby", @form_field.attributes["aria-labelledby"]
@search_field.attr "aria-labelledby", @form_field.attr "aria-labelledby"
else if Object.prototype.hasOwnProperty.call(@form_field,'labels') && @form_field.labels.length
labelledbyList = ""
for label, i in @form_field.labels
Expand Down
2 changes: 1 addition & 1 deletion docs/chosen.css
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
6 changes: 3 additions & 3 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 @@ -1153,9 +1153,9 @@ This file is generated by `grunt build`, do not edit it by hand.
var i, j, label, labelledbyList, len, ref;
this.search_field.attr("aria-owns", this.search_results.attr("id"));
if (this.form_field.attributes["aria-label"]) {
this.search_field.attr("aria-label", this.form_field.attributes["aria-label"]);
this.search_field.attr("aria-label", this.form_field.attr("aria-label"));
if (this.form_field.attributes["aria-labelledby"]) {
return this.search_field.attr("aria-labelledby", this.form_field.attributes["aria-labelledby"]);
return this.search_field.attr("aria-labelledby", this.form_field.attr("aria-labelledby"));
}
} else if (Object.prototype.hasOwnProperty.call(this.form_field, 'labels') && this.form_field.labels.length) {
labelledbyList = "";
Expand Down
4 changes: 2 additions & 2 deletions docs/chosen.jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/chosen.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion docs/chosen.proto.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 933c294

Please sign in to comment.