Commit 92411bd2 by Dave St.Germain

Merge pull request #2754 from edx/dcs/a11y-shorter-titles

Display only the first component name in the page (and nav) title.
parents a6d0c78d 155ed8c6
......@@ -88,20 +88,20 @@ class SequenceModule(SequenceFields, XModule):
rendered_child = child.render('student_view', context)
fragment.add_frag_resources(rendered_child)
for grand_child in child.get_children():
title = grand_child.display_name
if title:
break
else:
title = child.display_name_with_default
childinfo = {
'content': rendered_child.content,
'title': "\n".join(
grand_child.display_name
for grand_child in child.get_children()
if grand_child.display_name is not None
),
'title': title,
'progress_status': Progress.to_js_status_str(progress),
'progress_detail': Progress.to_js_detail_str(progress),
'type': child.get_icon_class(),
'id': child.id,
}
if childinfo['title'] == '':
childinfo['title'] = child.display_name_with_default
contents.append(childinfo)
params = {'items': contents,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment