I have to change the span element aria-hidden value to "true" on focus change event. How can I do that?
Here is my span element declaration-
<span id="jawshide">#someText</span>
and here is javascript part-
document.getElementById('jawshide').innerHTML= "aria-hidden='true'";
What is the correct way to add this property?
You can do this using setAttribute
document.getElementById('jawshide').setAttribute('aria-hidden', 'true');