You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* update menu style
* wip update styles for main nav and nav link
* clean up
* rename parseItems to parseJsonProp
* clean up function update
* update current link style
* data driven nav link
* rename go-main-nav to go-nav-bar
* refactor go-nav-bar into go-nav-item
* nav item add columns option
* add columns option to nav item object
* refactor go-nav-item, go-nav-submenu-trigger and go-nav-submenu to allow composability
* header slot check
* footer update
* fix nav list in footer
* update go-nav-bar examples
A dropdown menu requires a trigger element, this can be set by using `trigger-selector` similar to [`go-dropdown`](go-dropdown).
24
25
25
-
26
26
## Persistent
27
27
28
28
A dropdown menu can be `persistent` in order to allow users to interact with the widget continuously.
29
29
30
-
31
30
## Accessibility
32
31
33
32
WAI [Menu button](https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/) pattern aligns closely to the `go-dropdown-menu` component.
34
33
35
34
### Menu button
35
+
36
36
- Use a button element (`go-button`, `button` or `input type="button"`) as the trigger element.
37
37
-`aria-haspopup` will be set automatically on the trigger element to the id of the menu.
38
38
- When the menu is displayed, the trigger element has `aria-expanded` set to true. When the menu is hidden, `aria-expanded` is removed. If `aria-expanded` is specified when the menu is hidden, it is set to false.
39
39
- The trigger element has a value specified for `aria-controls` that refers to the element with role menu.
40
40
41
-
42
41
#### Keyboard
42
+
43
43
When trigger button has focus:
44
+
44
45
- <kbd>Enter</kbd>: opens the menu and places focus on the first menu item.
45
46
- <kbd>Space</kbd>: opens the menu and places focus on the first menu item.
46
47
- <kbd>Down Arrow</kbd>: opens the menu and moves focus to the first menu item.
47
48
- <kbd>Up Arrow</kbd>: opens the menu and moves focus to the last menu item.
48
49
49
50
When focus is inside the dropdown menu:
51
+
50
52
- <kbd>Down Arrow</kbd>: move focus to the next menu item, if current item is the last one, move focus to the first menu item.
51
53
- <kbd>Up Arrow</kbd>: move focus to the previous menu item, if current item is the first one, move focus to the last menu item.
52
54
- <kbd>Esc</kbd>: closes the menu.
@@ -56,10 +58,9 @@ When focus is inside the dropdown menu:
56
58
The keyboard interaction of the menu follows the WAI guideline for [Keyboard navigation inside components](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_general_within), which means <kbd>Tab</kbd> and <kbd>Shift + Tab</kbd> do not move focus between menu items, instead, they are only used to focus in and out of the dropdown menu.
57
59
58
60
> the tab sequence should include only one focusable element of a composite UI component. Once a composite contains focus, keys other than <kbd>Tab</kbd> and <kbd>Shift + Tab</kbd> enable the user to move focus among its focusable elements
61
+
>
59
62
> -[Developing a Keyboard Interface](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_general_within) by WAI APG
0 commit comments