# UI state / Toolbar navigation menu

**URL:** <https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216>\
**Category:** Accessibility\
**Created:** [August 17, 2023, 3:59pm UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216 "2023-08-17T15:59:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hayavuk](https://talk.getindico.io/user_avatar/talk.getindico.io/hayavuk/32/1303_2.png) [@hayavuk](https://talk.getindico.io/u/hayavuk)\
**Post date:** [August 17, 2023, 3:59pm UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/1 "2023-08-17T15:59:13Z")

</div>

**URL:** /  
**Criterion:** [4.1.2 Name, Role, Value (A)](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html)

In some cases, we use elements that don’t have a prescribed behavior or their behaviors don’t match the default one. Accessibility tools should still be able to determine and convey the intended behavior to the end user.

The navigation menu in the toolbar does not provide enough information for programmatically determining its function and states.

As we have determined that jQuery should be phased out and replaced by vanilla code that is compatible with React, I have coded up a PoC for the possible fox for the toolbar menu.

You can find the implementation [on Codepen.io](https://codepen.io/hayavuk/pen/vYvBMQN).

The menu implementation uses the `NAV` element as the outermost wrapper. This gives the users with advanced accessibility needs a labelled landmark to land on. The menu itself is marked up using the `MENU` tag. Additionally a custom element `UI-DROPDOWN` is used to manage the button state.

The PoC implementation uses a button to activate the second level. I also had another idea that doesn’t require any JavaScript. It would expand the second level automatically as the user tabs into it. The problem with this idea is it’s too cool… No, I’m joking. The problem is that the user needs to tab through each and every link without the ability to skip over sections that they don’t care about.

I will integrate this fix into the Indico core once I’m finished with my text fixes.

---

<div class="post-metadata">

**Author:** ![troun](https://talk.getindico.io/user_avatar/talk.getindico.io/troun/32/1230_2.png) [@troun](https://talk.getindico.io/u/troun)\
**Post date:** [August 18, 2023, 9:10am UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/2 "2023-08-18T09:10:46Z")

</div>

> [@hayavuk](#):
>
> problem with this idea is it’s too cool…

😃

Nice job, I like it! And of course the less jQuery the better…

---

<div class="post-metadata">

**Author:** ![hayavuk](https://talk.getindico.io/user_avatar/talk.getindico.io/hayavuk/32/1303_2.png) [@hayavuk](https://talk.getindico.io/u/hayavuk)\
**Post date:** [August 18, 2023, 10:14am UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/3 "2023-08-18T10:14:32Z")

</div>

@troun Off the top of your head, do you foresee any issues with integrating that? Maybe some tips on what I should watch out for?

---

<div class="post-metadata">

**Author:** ![troun](https://talk.getindico.io/user_avatar/talk.getindico.io/troun/32/1230_2.png) [@troun](https://talk.getindico.io/u/troun)\
**Post date:** [August 18, 2023, 11:58am UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/4 "2023-08-18T11:58:45Z")

</div>

I’m not that familiar with that part of the code, so can’t think of anything rn. I can have a look later at the code we have currently and see if there’s anything

---

<div class="post-metadata">

**Author:** ![hayavuk](https://talk.getindico.io/user_avatar/talk.getindico.io/hayavuk/32/1303_2.png) [@hayavuk](https://talk.getindico.io/u/hayavuk)\
**Post date:** [August 18, 2023, 12:35pm UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/5 "2023-08-18T12:35:56Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![troun](https://talk.getindico.io/user_avatar/talk.getindico.io/troun/32/1230_2.png) [@troun](https://talk.getindico.io/u/troun)\
**Post date:** [August 18, 2023, 3:43pm UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/6 "2023-08-18T15:43:11Z")

</div>

Doesn’t seem like there’s much to it besides the menu items being provided dynamically:

> <https://github.com/indico/indico/blob/495f4b3f541cb300232fb482d2826a78b28cf9f5/indico/web/templates/header.html#L24-L47>

---

<div class="post-metadata">

**Author:** ![hayavuk](https://talk.getindico.io/user_avatar/talk.getindico.io/hayavuk/32/1303_2.png) [@hayavuk](https://talk.getindico.io/u/hayavuk)\
**Post date:** [August 18, 2023, 5:23pm UTC](https://talk.getindico.io/t/ui-state-toolbar-navigation-menu/3216/7 "2023-08-18T17:23:50Z")

</div>

Thanks for looking into it. I’ll take care of it on Monday then, and we’ll see how it goes. 🙂
