Skip to content

Commit

Permalink
MDL-54832 workshop: adding landmark for userplantable
Browse files Browse the repository at this point in the history
Accessibility enhance: add an aria-label on the userplan table so
that it's accessible to me through my screen reader
  • Loading branch information
Loc Nguyen committed Jul 5, 2016
1 parent 566f5a7 commit 744adf1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions mod/workshop/lang/en/workshop.php
Expand Up @@ -308,6 +308,7 @@
$string['userdatemodified'] = 'modified on <span>{$a}</span>';
$string['userplan'] = 'Workshop planner';
$string['userplan_help'] = 'The workshop planner displays all phases of the activity and lists the tasks for each phase. The current phase is highlighted and task completion is indicated with a tick.';
$string['userplanaccessibilitytitle'] = 'Workshop timeline with {$a} phases';
$string['useselfassessment'] = 'Use self-assessment';
$string['useselfassessment_help'] = 'If enabled, a user may be allocated their own submission to assess and will receive a grade for assessment in addition to a grade for their submission.';
$string['useselfassessment_desc'] = 'Students may assess their own work';
Expand Down
3 changes: 3 additions & 0 deletions mod/workshop/renderer.php
Expand Up @@ -283,6 +283,9 @@ protected function render_workshop_example_submission_summary(workshop_example_s
protected function render_workshop_user_plan(workshop_user_plan $plan) {
$table = new html_table();
$table->attributes['class'] = 'userplan';
$table->attributes['role'] = 'section';
$numberofphases = count($plan->phases);
$table->attributes['aria-label'] = get_string('userplanaccessibilitytitle', 'workshop', $numberofphases);
$table->head = array();
$table->colclasses = array();
$row = new html_table_row();
Expand Down

0 comments on commit 744adf1

Please sign in to comment.