Skip to content

Commit

Permalink
fix(vakata#2755) : set the aria-exepended attribute on the link element
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier.camon committed Nov 10, 2023
1 parent b3135cf commit 35f1148
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
idregex : /[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,
root : '#'
};

/**
* creates a jstree instance
* @name $.jstree.create(el [, options])
Expand Down Expand Up @@ -454,7 +454,7 @@
*/
restore_focus : true,
/**
* Force to compute and set "aria-setsize" and "aria-posinset" explicitly for each treeitem.
* Force to compute and set "aria-setsize" and "aria-posinset" explicitly for each treeitem.
* Some browsers may compute incorrect elements position and produce wrong announcements for screen readers. Defaults to `false`
* @name $.jstree.defaults.core.compute_elements_positions
*/
Expand Down Expand Up @@ -2722,7 +2722,7 @@
if(!animation) {
this.trigger('before_open', { "node" : obj });
d[0].className = d[0].className.replace('jstree-closed', 'jstree-open');
d[0].childNodes[1].setAttribute("aria-expanded", true);
d.children('.jstree-anchor').attr("aria-expanded", true);
}
else {
this.trigger('before_open', { "node" : obj });
Expand Down Expand Up @@ -4996,7 +4996,7 @@
return d;
};
$.vakata.trim = function (text) {
return String.prototype.trim ?
return String.prototype.trim ?
String.prototype.trim.call(text.toString()) :
text.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
};
Expand Down

0 comments on commit 35f1148

Please sign in to comment.