WebAIM - Web Accessibility In Mind

E-mail List Archives

Thread: Access checkboxes with JAWS software

for

Number of posts in this thread: 2 (In chronological order)

From: suman damera
Date: Tue, Sep 06 2011 10:18PM
Subject: Access checkboxes with JAWS software
No previous message | Next message →

Hi

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/... but i couldnt
get this working please let me know how to go about it

I have also posted in one of the discussion forums
http://www.accessifyforum.com/viewtopic.php?p=80689&;posted_new_topic=1

Please let me know if u have any solution regarding the below code

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 styleclass=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 styletitle=%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)

Thanks..

From: Vincent Young
Date: Tue, Sep 13 2011 9:39PM
Subject: Re: Access checkboxes with JAWS software
← Previous message | No next message

Hi Suman,

If you want a potential reply I would suggest posting the HTML output from
your PYTHON script.

Best,
Vincent

On Tue, Sep 6, 2011 at 9:17 PM, suman damera < = EMAIL ADDRESS REMOVED = > wrote:

> Hi
>
> 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/... but i couldnt
> get this working please let me know how to go about it
>
> I have also posted in one of the discussion forums
> http://www.accessifyforum.com/viewtopic.php?p=80689&;posted_new_topic=1
>
> Please let me know if u have any solution regarding the below code
>
> 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)
>
> Thanks..
>