How to change tabindex or tabIndex of menu item

Hi there,

how can i change the tabindex of a menu item to -1?

I would like to change this because on the iPhone the first item “Startseite” in the mobile menu automatically has an accessible frame.

Hey @NoProblemForMe.

You can’t and there is no reason to do so.

The first item which should be focused when opening a modal should always be the close icon.

If you want to style or even get rid of the “accessibility frame”, you need to tweak the outline property of your menu item links:



Please let me know if you need further guidance.

Thank you for your helpful response @Marius!

How can I set the closing button as the first item in focus?

You can place your icon block as a first (focusable) element inside the modal block, like:

Let me know if that works out for you @NoProblemForMe.

Yes, now the closing button is the first element in focus.

Thank you!