I figured out how to use <label> correctly in UiBinder.

In MyPanel.ui.xml:

<g:HTMLPanel>
  <p>
    <label ui:field='nameLabel'><g:TextBox ui:field='name'>
  </p>
</g:HTMLPanel>

In MyPanel.java:

public interface MyUiBinder extends UiBinder<Composite, MyPanel>{}
public ststic MyUiBinder = GWT.create(MyUiBinder.class);
@UiField LabelElement nameLabel;
@UiField TextBox name;
public MyPanel() {
  initWidget(createAndBindUi(this));
  String id = Document.get().createUniqueId();
  nameLabel.setHtmlFor(id);
  name.setId(id);
}

I also saw that CaptionPanel is fine even without FormPanel, though
the HTML won't be 'valid'.

I'd still like to see a way to use <optgroup>, and "aria-labelledby"
should be a constant in the Accessibility class.

Respectfully,
Eric Jablow

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to