Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18471 closed defect (worksforme)

Select: attribute for in <label>

Reported by: [email protected] Owned by:
Priority: undecided Milestone: tbd
Component: Dijit - Form Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:


I want link label with widget

<label for="${id}_1">Label</label> <select id="${id}_1" data-dojo-type="dijit/form/Select"></select>

Id is assigned to the widget, not to dijit input field. How can I activate this linking?

Change History (4)

comment:1 Changed 7 years ago by bill

Summary: attribute for in <label> and dijit/form/selectSelect: id should be mapped to <input>

Oh, that's just a bug, it should be assigned to the <input>. And it works that way for ComboBox? (where the <input> gets id=foo and the widget DOM node gets id="widget_foo").

comment:2 Changed 7 years ago by bill

Resolution: worksforme
Status: newclosed
Summary: Select: id should be mapped to <input>Select: attribute for in <label>

Actually, my last comment doesn't make sense, because Select's focusNode is not an <input> at all, but a <table>.

About the syntax you put in the description:

<label for="${id}_1">Label</label>
<select id="${id}_1" data-dojo-type="dijit/form/Select"></select>

That actually works fine for JAWS (tested on JAWS 15, firefox). But it doesn't work for Safari VoiceOver? (iOS 8.1), and it isn't technically correct, according to the ARIA spec.

So ideally, instead of <label> should use the aria-labelledby property, like this:

<span id="foo_label">Label</span>
<select id="foo" data-dojo-type="dijit/form/Select" aria-labelledby="foo_label">

I will update the doc and examples w/this info.

comment:3 Changed 7 years ago by Bill Keese <[email protected]…>

In bd964104c694073d6061eb71513975cb36275399/dijit:

Error: Processor CommitTicketReference failed
Unsupported version control system "git": Can't find an appropriate component, maybe the corresponding plugin was not enabled? 
Note: See TracTickets for help on using tickets.