Accessible alternatives for radioButtons, checkboxGroupInput and fileInput added
This commit is contained in:
14
inst/js/a11yShinyInputs.js
Normal file
14
inst/js/a11yShinyInputs.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const checkAll = function(event) {
|
||||
event.preventDefault();
|
||||
const $input = $(event.target).closest('.shiny-input-a11ycheckboxgroup');
|
||||
$input.find('input[type=\"checkbox\"]').prop('checked', true);
|
||||
$input.trigger('change');
|
||||
return false;
|
||||
};
|
||||
const clearAll = function(event) {
|
||||
event.preventDefault();
|
||||
const $input = $(event.target).closest('.shiny-input-a11ycheckboxgroup');
|
||||
$input.find('input[type=\"checkbox\"]').prop('checked', false);
|
||||
$input.trigger('change');
|
||||
return false;
|
||||
};
|
||||
Reference in New Issue
Block a user