• 
      

    Add support for disabled menu items.

    Review Request #14421 — Created May 3, 2025 and submitted — Latest diff uploaded

    Information

    Ink
    master

    Reviewers

    Menu items can now be marked as disabled. When disabled, they can still
    be selected for menu navigation or on mouse over, but no actions will be
    performed. Clicking or pressing Space or Enter will do nothing, and the
    menu will remain open. This allows for accessible keyboard navigation
    without risk of performing unwanted actions.

    An internal change to state tracking had to be made. Previously,
    #items tracked only menu items (no separators), but #itemViews
    tracked all views (menu items and separators). This meant that an index
    for one didn't apply to the other. We now keep those two consistent on
    menu items, and track everything under #allItemViews.

    Tested with a menu consisting of enabled and disabled menu items of
    all types. Verified that I could select but could not invoke any disabled
    item actions through any means.

    Unit tests pass.


    Commits

    Files