Fix accessibility.

This commit is contained in:
BoHung Chiu 2023-07-08 15:49:32 +08:00
parent ebdd9b6db4
commit 3be81db424
3 changed files with 13 additions and 6 deletions

View File

@ -25,7 +25,6 @@
.gallery.card-group .card.card-flip.h-100 { .gallery.card-group .card.card-flip.h-100 {
position: relative; position: relative;
overflow: hidden;
width: 25%; width: 25%;
width: calc( 25% - 0.75em); width: calc( 25% - 0.75em);
background: white; background: white;

View File

@ -1,11 +1,6 @@
@import url(https://fonts.googleapis.com/css?family=Roboto); @import url(https://fonts.googleapis.com/css?family=Roboto);
/* Reset and basic styles */ /* Reset and basic styles */
body {
overflow-x: hidden;
}
*, *,
*:before, *:before,
*:after { *:after {

View File

@ -35,4 +35,17 @@
</div> </div>
</div> </div>
</div> </div>
<script>
$(document).ready(function(){
$('[data-subpart-id="{{subpart-id}}"] .card-body a').on('focusin', function(){
var _this = $(this);
var card_flip = _this.parents('.card-flip');
card_flip.addClass('hover-class');
var off_hover = function(){
card_flip.removeClass('hover-class');
}
_this.one('focusout', off_hover);
})
})
</script>
</div> </div>