Skip to content

Missing Keyboard Support: MenuBar and MenuButton #98

@crhallberg

Description

@crhallberg

Been looking into this library with much interest! You're going to save me a lot of work and I'm very grateful! I have an issue with the latest code that's keeping me from adopting it immediately, but I am willing on contribute.

I'm a little confused by the removal of MenuBar and MenuButton in the dev code vs. the last release. I understand your concern about a one-size-fits-all MenuButton, but I think deferring these components to Menu and Disclosure does them a disservice and removes the unique functionality of both. At the very least, we can update the examples to show how Disclosure can be used with a Menu.


Arrow Navigation

It looks like Menu's up/down arrow control has been removed.

Menu is also missing MenuBar's ability to ArrowKey navigate between top-level items. This functionality is available in Tablist, maybe getNextIndex can be abstracted into a module that can be applied to Menu, and is applied to Tablist by default.

Menu Focusing

Missing from Disclosure is the focusing on the first/last item that MenuBar and MenuButton both support. It looks like Listbox does have this support. I think this can be easily patched in after init, so it may not necessarily need to be part of the library, but it should be used in the example if you'd rather leave it out.


I'd be happy to contribute or be patient, since you seem to be validating and fleshing out components as recently as last week. Let me know if there's something I'm misunderstanding or if there's anything I can get started on!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions