List of usage examples for com.google.gwt.aria.client Roles getMenubarRole
public static MenubarRole getMenubarRole()
From source file:com.google.gerrit.client.ui.LinkMenuBar.java
License:Apache License
public LinkMenuBar() { body = new FlowPanel(); initWidget(body);/*from w w w . j a va2 s . c o m*/ setStyleName(Gerrit.RESOURCES.css().linkMenuBar()); Roles.getMenubarRole().set(getElement()); Gerrit.EVENT_BUS.addHandler(ScreenLoadEvent.TYPE, this); }
From source file:com.haulmont.cuba.web.toolkit.ui.client.suggestionfield.menu.SuggestionsContainer.java
License:Apache License
protected void selectItem(SuggestionItem item) { if (item == selectedSuggestion) { return;//w w w .j a va2s . com } if (selectedSuggestion != null) { selectedSuggestion.updateSelection(false); } if (item != null) { item.updateSelection(true); Roles.getMenubarRole().setAriaActivedescendantProperty(getElement(), Id.of(item.getElement())); } selectedSuggestion = item; }