How to check (select) element in ARIA-menuitemcheckbox (javascript)?

I have the following HTML item (menubox):

</div> </div> </div>

and i can see that Item1 is deselected, and Item2 is selected with:

aria-checked="true"

and i want to deselect Item2 and select Item1. For this purpose take objectID from Item1 that says it's selected

_54nc _54nu

and call

document.getElementById("_54nc _54nu").setAttribute("aria-checked", true)', 'about: blank', 0)

but nothin happens. What did i missed?

P.S. I see that all object-ID's of class are same, but i also tried other id's. Maybe I misunderstood the issue of id for the class, and maybe the way it is different. Please give me directions. 🙂


Source: stackoverflow-javascript