# Menu item focus order in VoiceOver

**URL:** <https://forum.juce.com/t/menu-item-focus-order-in-voiceover/53805>\
**Category:** General JUCE discussion\
**Created:** [November 19, 2022, 5:19pm UTC](https://forum.juce.com/t/menu-item-focus-order-in-voiceover/53805 "2022-11-19T17:19:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jpo/32/503_2.png) [@jpo](https://forum.juce.com/u/jpo)\
**Post date:** [November 19, 2022, 5:19pm UTC](https://forum.juce.com/t/menu-item-focus-order-in-voiceover/53805/1 "2022-11-19T17:19:27Z")

</div>

Hi, when a PopupMenu is too large to fit in a single column, the navigation order with VoiceOver is line by line (all items of first line, then all items of second line etc) instead of column by column (first item of first column, then second item of first column, etc…).

In order to fix that I suggest to add an explicit focus order when building the juce::MenuWindow constructor:

```auto
            if (i + 1 < menu.items.size() || ! item.isSeparator)
             {
                 auto* child = items.add (new ItemComponent (item, options, *this));
+ child->setExplicitFocusOrder(1000+i);
                 if (initialSelectedId != 0 && item.itemID == initialSelectedId)
                     setCurrentlyHighlightedChild (child);

```

---

<div class="post-metadata">

**Author:** ![attila](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/attila/32/11206_2.png) [@attila](https://forum.juce.com/u/attila)\
**Post date:** [February 9, 2023, 2:28pm UTC](https://forum.juce.com/t/menu-item-focus-order-in-voiceover/53805/2 "2023-02-09T14:28:56Z")

</div>

Thank you for reporting this. A fix has been released on `develop`

> <https://github.com/juce-framework/JUCE/commit/a662e5584bbdb9f16f0ffe6da62371af0718b56b>
>
> Without this VoiceOver will iterate over menu items left to right first,
> and ite…ration order will be affected by whether the PopupMenu gets
> broken up into multiple columns due to not enough screen space.
