Log in   Register a New Account

Accessify Forum - Discuss Website Accessibility

New to the forum?

Only an email address is required.

Register Here

Already registered? Log In

Currently Online

No registered users are online.

Making checkboxes accessible with JAWS

  • Reply to topic
  • Post new topic
Reply with quote I have the following code for displaying a tree of checkboxes and this is in python server side programming.My question is that how do i make this accessible from JAWS

i HAD BEEN TRYING ON http://test.cita.illinois.edu/aria/checkbox/checkbox3.php#lsc1 but i couldnt get this working please let me know how to go about it

def checkboxes(request):
for sub in subs:
subject = Subject.objects.get(pk=int(sub))
topics = subject.topic_set.all()
html = html + "<ul class=\"ltr\"> <li class=\"last opened open\" id = \"s_%d\" subject_id = \"%d\" readonly=readonly >&nbsp;&nbsp;&nbsp;&nbsp;%s" %(subject.id, subject.id, subject.sub_stand_baord())
for topic in topics:
child_json = ""
subtopic_used_count = 0
subtopic_selected_count = 0
subtopic_count = 0
topic_type = "cur_used"
child_html = ""
e_topic = topic.topic
for subtopic in topic.subtopic_set.all():
e_subtopic = get_escaprechars(subtopic.subtopic)
type = "cur_used"
selected = ""
open = ""
for top in list:
if top == subtopic.id :
subtopic_count = subtopic_count + 1
selected = "class=\"clicked checked\""
open = "selected rel=cur_used"

child_html = child_html + "<li class=\"leaf %s \" desc=\"%s\" topic_desc=\"%s\" node_id=\"%d\" id = \"s_%s\" topic_id = \"%d\" type = \"s\" rel = \"%s\" time= \"%d\" > <a href=\"\" %s style=\"\" class=\"st_%d\" title=\"%s\" ><ins>&nbsp;</ins>%s</a></li>" % (open, e_subtopic, e_topic, subtopic.id, e_subtopic, topic.id, type, subtopic.duration, selected, subtopic.id, e_subtopic, e_subtopic)

child_json = child_json + "{ data : \"%s\", attributes : {topic_desc : \"%s\", node_id:\"%d\", id : \"s_%d\", topic_id : \"%d\", type : \"s\", rel : \"%s\", time: \"%d\"} }," % (e_subtopic, e_topic, subtopic.id, subtopic.id, topic.id, type, subtopic.duration)

child_json = child_json.strip(",")
t_c = "class=\"last closed\""
t_selected = ""
if subtopic_count != 0 and subtopic_count == topic.subtopic_set.all().count():
t_selected = "class=\"clicked checked\""
t_c = "class=\"last open\""
elif subtopic_count > 0 :
t_selected = "class=\"undetermined\""
t_c = "class=\"last open\""

html = html + "<ul class=\"ltr\"> <li %s desc=\"%s\" id=\"t_%s\" topic_id = \"%d\" type = \"t\" rel =\"%s\"><a href=\"\" %s style=\"\" title=\"%s\"><ins>&nbsp;</ins>%s</a><ul>%s</ul></li></ul>" % (t_c, e_topic, e_topic, topic.id, topic_type, t_selected , e_topic, e_topic,child_html)

json_data = json_data + "{ data : \"%s\", attributes : {id : \"t_%d\", topic_id : \"%d\", type : \"t\", rel :\"%s\" }, children : [ %s ] }," % (e_topic, topic.id, topic.id, topic_type, child_json)

html = html + "</li></ul>"

json_data = json_data.strip(",")
selected_array = selected_array.strip(",")
opened_array = opened_array.strip(",")
selected_array += "]"
opened_array += "]"

return (html,json_data, selected_array, opened_array)

Display posts from previous:   

All times are GMT

  • Reply to topic
  • Post new topic