mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
add screen reader support for radio buttons
This commit is contained in:
parent
65142d8cb3
commit
fda0d2eb22
@ -1416,7 +1416,14 @@ define([
|
||||
}
|
||||
});
|
||||
|
||||
$input.change(function () { $(mark).focus(); });
|
||||
$input.change(function () {
|
||||
$(mark).attr('aria-checked', $input.is(':checked') ? 'true' : 'false');
|
||||
$('input[name="' + name + '"]').not($input).each(function() {
|
||||
var otherRadio = $(this).closest('.cp-radio').find('.cp-radio-mark');
|
||||
otherRadio.attr('aria-checked', false);
|
||||
});
|
||||
$(mark).focus();
|
||||
});
|
||||
|
||||
var radio = h('label', labelOpts, [
|
||||
input,
|
||||
|
||||
@ -3524,7 +3524,7 @@ define([
|
||||
anonOffContent, false, {
|
||||
input: { value: 0 },
|
||||
});
|
||||
var radioContainer = h('div.cp-form-required-radio', [
|
||||
var radioContainer = h('fieldset.cp-form-required-radio', {'aria-label': Messages.form_answerChoice },[
|
||||
Messages.form_answerChoice,
|
||||
anonRadioOn,
|
||||
anonRadioOff,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user