How to add aria-selected=true attibute in the sap.ui.unified.MenuItem or sap.m.MenuItem
OpenUI5 version:
Browser/version (+device/version):
Any other tested browsers/devices(OK/FAIL):
URL (minimal example if possible):
User/password (if required and possible - do not post any confidential information here):
Steps to reproduce the problem:
- I tried this on the xml and I can't find in the generated html 2. 3.
What is the expected result?
What happens instead?
Any other information? (attach screenshot if possible)
Hello @boyetp123 ,
Normally aria-selected would be maintained internally by the framework. There should be no need to set it.
For this specific case - both menus actually don't have any "selected" state . When item is pressed menu is closed. So there is no need of aria-selected.
Regards, Alexandar Mitsev
@alexandar-mitsev , I have a case where when we open the menu, we are also indicating of what folder or data in the tabletree the keyboard user with disability are they
Hi @boyetp123 ,
this is handled by the keyboard navigation and the focus. When user navigates with keyboard through the menu he is notified where he is and the corresponding item is focused. The attribute aria-selected is not for that.
Regards, Alex