Opened 6 years ago

Closed 6 years ago

#15138 closed bug (notabug)

checkboxradio label property didn't work if there is no label tags for the associated radio button.

Reported by: Keenan Mandela Gebze Owned by:
Priority: minor Milestone: none
Component: ui.checkbxoradio Version: 1.12.1
Keywords: Cc:
Blocked by: Blocking:


The code:

I'm thinking that creating a radio button without its associated label can be done:

<input type="radio" name="price" value="Very Not Agree" />
<input type="radio" name="price" value="Not Agree" />
<input type="radio" name="price" value="Agree" />
<input type="radio" name="price" value="Very Agree" />

    var radios = $("input[type='radio']");
        label: "tests"

But, instead of creating four checkboxradio buttons with "tests" as its label, it jquery throws an

"Uncaught Error: No label found for checkboxradio widget"


To fix this error, I would have to put an id field and a label tag for each of the radio buttons. (Which will be costly if I have hundreds of them!)

So I consider this as either a bug and a feature request!


Bug: I expect that by specifying an object with "label" property to the checkboxradio() method, the resulting checkboxradio button will display the specified label regardless of the absence/or presence of label tag (<label>).

Feature request: It would be nice if the default radio button label come from the radio button's value, if there is no associated label.

Change History (1)

comment:1 Changed 6 years ago by Scott González

Resolution: notabug
Status: newclosed

That markup is not accessible and is therefore not supported. You must provide the <label> yourself.

Note: See TracTickets for help on using tickets.