set aria expanded false javascript code example
Example 1: js set attribute aria-expanded
document.getElementById(id2).setAttribute('aria-expanded', 'true');
Example 2: how to get aria expanded value in javascript
document.getElementById('test').getAttribute('aria-expanded')