make poll questions accessible for keyboard #1966

This commit is contained in:
daria 2025-06-24 11:55:18 +03:00
parent 4ff20bba60
commit 8d8e314787
No known key found for this signature in database
GPG Key ID: 3B75240E6B2F2701
2 changed files with 12 additions and 2 deletions

View File

@ -1254,9 +1254,12 @@
.cp-poll-switch {
button.btn {
border-radius: 0;
background-color: transparent;
box-shadow: none;
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
border: 0;
}
}
}
@ -1368,6 +1371,13 @@
background: @cp_form-poll-maybe;
.cp-maybe { display: inline; }
}
&:focus-visible {
outline: @variables_focus_style;
border-radius: @variables_radius;
}
&:last-of-type {
margin-right: 0.2rem;
}
}
div.cp-form-poll-choice {
cursor: pointer;

View File

@ -2590,8 +2590,8 @@ define([
var $c = $(cell);
$c.data('option', data);
var val = 0;
$c.attr('data-value', val);
$c.click(function () {
$c.attr('data-value', val).attr('tabindex', '0');
Util.onClickEnter($c, function () {
if (disabled) { return; }
val = (val+1)%3;
$c.attr('data-value', val);