Skip to content

Commit

Permalink
add aria-current attribute to current question in the navmenu, and cu…
Browse files Browse the repository at this point in the history
…rrent part in explore breadcrumbs
  • Loading branch information
christianp committed Aug 25, 2023
1 parent 21befcb commit a32c1c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion themes/default/templates/nav-sequence.html
Expand Up @@ -20,7 +20,7 @@ <h2 data-bind="text: name, typeset: name"></h2>
<!-- /ko -->
<!-- ko foreach: questions -->
<li class="questionSelector" data-bind="visible: visible, css: {active: $root.exam().currentQuestion()==$data}">
<a href="#" class="clearfix" role="button" tabindex="0" data-bind="click: Numbas.controls.makeQuestionJumper(question.number)">
<a href="#" class="clearfix" role="button" tabindex="0" data-bind="click: Numbas.controls.makeQuestionJumper(question.number), attr: {'aria-current': $root.exam().currentQuestion()==$data ? 'step' : false}">
<div class="info">
<span class="feedback-icon" data-bind="css: scoreFeedback.iconClass, attr: scoreFeedback.iconAttr" aria-hidden="true"></span>
<span class="name" data-bind="text: displayName"></span>
Expand Down
2 changes: 1 addition & 1 deletion themes/default/templates/question.xslt
Expand Up @@ -24,7 +24,7 @@ Copyright 2011-16 Newcastle University
<span class="part-progress"><localise>question.progress</localise></span>
<div class="part" data-bind="treeView: firstPart">
<div data-bind="jmescope: part.getScope()">
<a class="name" data-bind="latex: name, click: $parent.setCurrentPart, css: partTreeCSS"></a>
<a class="name" data-bind="latex: name, click: $parent.setCurrentPart, css: partTreeCSS, attr: {% raw %}{{'aria-current': partTreeCSS().current ? 'step' : false}}{% endraw %}"></a>
</div>
<ul data-bind="foreach: madeNextParts">
<li>
Expand Down

0 comments on commit a32c1c9

Please sign in to comment.