Source:
<code>protected SecondaryToolbar createSecondaryToolbar() { replaceToolbar_ = new SecondaryToolbar("Replace"); replaceMode_ = true; <START> replaceLabel_ = new Label("Replace with: "); <END> replaceToolbar_.addLeftWidget(replaceLabel_); replaceTextBox_ = new TextBox(); replaceToolbar_.addLeftWidget(replaceTextBox_); replaceTextBox_.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { displayPreview_.nudge(); } }); useGitIgnore_ = new CheckBox(); useGitIgnoreLabel_ = new CheckboxLabel(useGitIgnore_, "Use .gitignore").getLabel(); useGitIgnore_.getElement().getStyle().setMarginRight(0, Unit.PX); replaceToolbar_.addLeftWidget(useGitIgnore_); useGitIgnoreLabel_.getElement().getStyle().setMarginRight(9, Unit.PX); replaceToolbar_.addLeftWidget(useGitIgnoreLabel_); useGitIgnore_.setVisible(false); useGitIgnoreLabel_.setVisible(false); stopReplace_ = new ToolbarButton( ToolbarButton.NoText, "Stop replace", commands_.interruptR().getImageResource()); stopReplace_.setVisible(false); replaceToolbar_.addRightWidget(stopReplace_); replaceAllButton_ = new ToolbarButton("Replace All", "Replace All", null); replaceToolbar_.addRightWidget(replaceAllButton_); replaceProgress_ = new ProgressBar(); replaceProgress_.setHeight("10px"); replaceProgress_.setWidth("195px"); replaceProgress_.setVisible(false); replaceToolbar_.addLeftWidget(replaceProgress_); return replaceToolbar_; }</code><technical_language>This needs a FormLabel. Label class, name, creates a div instead of HTML label, is a significant difference for accessibility. clicking label in UI. If focus control (the textbox), is properly a screen reader understand happen here. fix, this a FormLabel, create replaceTextBox_ (but adding of replaceToolbar_). FormLabel constructor takes string control associate with, i.e.: replaceTextBox_ = new TextBox(); replaceLabel_ = new FormLabel("Replace with: ", replaceTextBox_); replaceToolbar_.addLeftWidget(replaceLabel_); replaceToolbar_.addLeftWidget(replaceTextBox_); This generate a unique element ID for text box, set for=ID attribute <label> establishing connection</technical_language>

Target:
protected SecondaryToolbar createSecondaryToolbar() { replaceToolbar_ = new SecondaryToolbar("Replace"); replaceMode_ = true; replaceTextBox_ = new TextBox(); replaceTextBox_.addKeyUpHandler(new KeyUpHandler() { public void onKeyUp(KeyUpEvent event) { displayPreview_.nudge(); } }); replaceLabel_ = new FormLabel("Replace with: ", replaceTextBox_); replaceToolbar_.addLeftWidget(replaceLabel_); replaceToolbar_.addLeftWidget(replaceTextBox_); useGitIgnore_ = new CheckBox(); useGitIgnoreLabel_ = new CheckboxLabel(useGitIgnore_, "Use .gitignore").getLabel(); useGitIgnore_.getElement().getStyle().setMarginRight(0, Unit.PX); replaceToolbar_.addLeftWidget(useGitIgnore_); useGitIgnoreLabel_.getElement().getStyle().setMarginRight(9, Unit.PX); replaceToolbar_.addLeftWidget(useGitIgnoreLabel_); useGitIgnore_.setVisible(false); useGitIgnoreLabel_.setVisible(false); stopReplace_ = new ToolbarButton( ToolbarButton.NoText, "Stop replace", commands_.interruptR().getImageResource()); stopReplace_.setVisible(false); replaceToolbar_.addRightWidget(stopReplace_); replaceAllButton_ = new ToolbarButton("Replace All", "Replace All", null); replaceToolbar_.addRightWidget(replaceAllButton_); replaceProgress_ = new ProgressBar(); replaceProgress_.setHeight("10px"); replaceProgress_.setWidth("195px"); replaceProgress_.setVisible(false); replaceToolbar_.addLeftWidget(replaceProgress_); return replaceToolbar_; }