openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

How to add aria-selected=true attibute in the sap.ui.unified.MenuItem or sap.m.MenuItem

Open boyetp123 opened this issue 4 years ago • 3 comments

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:

  1. 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)

boyetp123 avatar Feb 11 '22 01:02 boyetp123

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 avatar Feb 11 '22 14:02 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

boyetp123 avatar Feb 14 '22 22:02 boyetp123

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

alexandar-mitsev avatar Feb 15 '22 11:02 alexandar-mitsev