This is a migrated thread and some comments may be shown as answers.

Checkboxes WCAG 2.0 AA Compliance

3 Answers 54 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Egon Leitgeb
Top achievements
Rank 1
Egon Leitgeb asked on 15 Apr 2015, 05:07 PM

I have a Treeview with Checkboxes enabled, here is aspx-Code:

<telerik:RadTreeView ID="trVars" runat="server" CheckBoxes="True" OnClientNodeChecked="onNodeChecked" OnNodeDataBound="trVars_NodeDataBound" OnNodeClick="trVars_NodeClick" />

Nodes are addes in server-side Code behind:

trVars.DataFieldID = "ID";
trVars.DataFieldParentID = "ParentID";
trVars.DataTextField = "varLabel";
trVars.DataValueField = "varName";
trVars.DataSource = tbl;
trVars.DataBind();

 For my application I need full compliance with the WCAG 2.0 AA standard. But the check did not pass because the checkboxes in the nodes need a label associated (Error Message in AC Checker: input element, type of "checkbox", has no text in label ...).

Please help!

3 Answers, 1 is accepted

Sort by
0
Ivan Zhekov
Telerik team
answered on 20 Apr 2015, 01:42 PM
Hello.

The compliance check will be successful if:
* there is a label with for attribute (with the proper value)
* there is around the label and text

(for reference http://achecker.ca/checker/suggestion.php?id=206)

We use the latter approach for RadTreeView.

Now, if the label itself does not have text, say the node is empty, that may cause the error. However, if the binding was successful and the tree looks normal and all nodes have text, then things should be OK.

Regards,
Ivan Zhekov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Egon Leitgeb
Top achievements
Rank 1
answered on 21 Apr 2015, 07:46 PM

Thanks for your answer! The TreeView works perfect without checkboxes. But with checkboxes set to true it generates HTML-Code like this

<span class="rtSp"></span><label><input type="checkbox" class="rtChk" /><span class="rtIn">Sex</span></label>

But for a successful check it should generate <label for="..."> ... </label> or something like this.

Regards, Egon

0
Ivan Zhekov
Telerik team
answered on 27 Apr 2015, 05:14 AM
Hi, Egon.

Usually you need either for attribute or label surrounding the input.

We'll do some more accessibility tests and I will write back.

Regards,
Ivan Zhekov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
TreeView
Asked by
Egon Leitgeb
Top achievements
Rank 1
Answers by
Ivan Zhekov
Telerik team
Egon Leitgeb
Top achievements
Rank 1
Share this question
or