Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update jQuery plugin so aria-label and aria-labelledby are copied to the search box correctly #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_jq.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_jq.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_jq.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_jq.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.