From db1d18fc5dabb6f07e0be692465d9c3c936b88fc Mon Sep 17 00:00:00 2001 From: Jeremy Leakakos and Jimmy Chao Date: Wed, 17 Dec 2014 15:23:54 -0500 Subject: [PATCH] Fix accessible aria activedescendant attribute Remove aria-activedescendant attribute after the dropdown is closed, to make sure the aria properties is vaild for aduit-tool [https://code.google.com/p/accessibility-developer-tools/wiki/AuditRules#AX_ARIA_04:_ARIA_state_and_property_values_must_be_valid] --- select2.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/select2.js b/select2.js index f063563f..a0661148 100644 --- a/select2.js +++ b/select2.js @@ -1486,6 +1486,9 @@ the specific language governing permissions and limitations under the Apache Lic this.clearSearch(); this.search.removeClass("select2-active"); + + // Remove the aria active descendant for highlighted element + this.search.removeAttr("aria-activedescendant"); this.opts.element.trigger($.Event("select2-close")); },