Ariakit
/

Examples

API

Can I use Menubar for site navigation?

Short answer: Yes, but be mindful. Check out the Navigation Menubar example.

ARIA doesn't specify how you should structure the contents of your site. It just describes how the roles should behave. If you've designed your site navigation to work precisely like a menubar and it's clear to the user, then you can use Menubar.

Using ARIA roles is like signing a contract with the user. You're saying, "I'm going to use this role to represent this thing, and you can expect it to work like this". If you don't follow through, you're breaking that contract, and the user will be confused.

In the case of the menubar role, the user expects being able to use arrow keys to navigate between menu items. Ariakit provides this behavior out of the box.

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue