Dropdown Menu
Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or command menus, where an action is initiated based on the selection.
Menu items can include checkboxes.
Design
Section titled “ Design”Custom button options
Section titled “Custom button options”Menu positions/options
Section titled “Menu positions/options”<certara-dropdown> will position the menu automatically to stay within the viewport, but can be set to show in a specific orientation with the placement attribute.
Nested dropdowns
Section titled “Nested dropdowns” Accessibility
Section titled “Accessibility”Note that dropdowns are keyboard friendly, since pressing ESC will hide active dropdowns.
ARIA (screen reader support)
Section titled “ARIA (screen reader support)”"aria-labelledby"aria-labelledby=“dropdownTrigger”) to the element that triggers it (id=“dropdownTrigger”). This allows the dropdown trigger to be not only visually associated with its corresponding dropdown menu; it is programmatically associated with it too. This means that, for example, a screen reader will read out the dropdown trigger when the user is focused on the button, making it easier for an assistive technology user to understand what menu the button/trigger is controlling.