File tree Expand file tree Collapse file tree
templates/ContentGenerator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 } ) ;
9494 }
9595
96+ // Make elements with role="button" activate upon use of the spacebar.
97+ for ( const btn of document . querySelectorAll ( '.spacebar-activatable' ) ) {
98+ btn . addEventListener ( 'keydown' , ( e ) => {
99+ if ( e . key === ' ' ) {
100+ e . preventDefault ( ) ;
101+ btn . click ( ) ;
102+ }
103+ } ) ;
104+ }
105+
96106 // Turn help boxes into popovers
97107 document . querySelectorAll ( '.help-popup' ) . forEach ( ( popover ) => {
98108 popover . addEventListener ( 'click' , ( e ) => e . preventDefault ( ) ) ;
Original file line number Diff line number Diff line change 1+ %
12<h2><%= maketext('Manage LTI Course Map') %> <%= $c->helpMacro('AdminManageLTICourseMap') %></h2>
23<%= form_for current_route, method => 'POST', begin =%>
34 <%= $c->hidden_authen_fields =%>
3031 </td>
3132 <td class="text-center">
3233 % if ($ltiConfigs->{$_}{LTIVersion} && $ltiConfigs->{$_}{LTIVersion} =~ /^v1p[13]$/) {
33- <a href="#" role="button" data-bs-toggle="modal"
34+ <a href="#" role="button" class="lti-config-btn spacebar-activatable" data-bs-toggle="modal"
3435 data-bs-target="#<%= $_ %>-config-modal">
3536 <i class="fa-solid fa-circle-question fa-xl"></i>
3637 <span class="visually-hidden"><%= maketext('LTI Configuration') %></span>
Original file line number Diff line number Diff line change 183183 <div class="d-flex justify-content-between gap-1">
184184 <%= maketext($jobs->{$jobID}{state}) =%>
185185 % if (defined $jobs->{$jobID}{result}) {
186- <a role="button" class="result-btn" tabindex="0" data-bs-toggle="modal" href="# "
187- data-bs-target="<%= "#result-$jobID" %>">
186+ <a role="button" class="result-btn spacebar-activatable" data-bs-toggle="modal"
187+ href="#" data-bs-target="<%= "#result-$jobID" %>">
188188 <i class="fa-solid fa-circle-info fa-xl" aria-hidden="true"></i>
189189 <span class="visually-hidden">
190190 <%= maketext('Result for job [_1]', $jobID) %>
You can’t perform that action at this time.
0 commit comments