private void accessibilityPrepare() { // Add ARIA roles for accessibility Roles.getButtonRole().set(backButton.getElement()); Roles.getButtonRole().setAriaLabelProperty(backButton.getElement(), "back"); Roles.getHeadingRole().set(heading.getElement()); Roles.getMenuRole().set(daysOfWeek.getElement()); Roles.getMenuRole().setAriaLabelProperty(daysOfWeek.getElement(), "select a departing day"); Roles.getMenuRole().setTabindexExtraAttribute(daysOfWeek.getElement(), 0); Roles.getMainRole().set(times.getElement()); Roles.getMainRole().set(cameras.getElement()); Roles.getTabRole().set(timesTab.getElement()); Roles.getTabRole().setAriaSelectedState(timesTab.getElement(), SelectedValue.TRUE); Roles.getTabRole().setAriaLabelProperty(timesTab.getElement(), "times"); Roles.getTabRole().set(camerasTab.getElement()); Roles.getTabRole().setAriaSelectedState(camerasTab.getElement(), SelectedValue.FALSE); Roles.getTabRole().setAriaLabelProperty(camerasTab.getElement(), "cameras"); Roles.getProgressbarRole().set(progressIndicator.getElement()); Roles.getProgressbarRole() .setAriaLabelProperty(progressIndicator.getElement(), "loading indicator"); // TODO Hide pull down until we can figure out how to get VoiceOver to work with it Roles.getButtonRole().setAriaHiddenState(pullArrowHeader.getElement(), true); accessibilityShowTimes(); }
@Override public void hideProgressIndicator() { progressIndicator.setVisible(false); }
@Override public void showProgressIndicator() { progressIndicator.setVisible(true); }