mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Fixed container class and button accessibility
This commit is contained in:
parent
3f8edc1c48
commit
9fd649fb8c
@ -3774,8 +3774,8 @@ define([
|
||||
}
|
||||
});
|
||||
$body.addClass('cp-form-palette-'+color);
|
||||
|
||||
$container.attr('class', 'cp-form-creator-content'+(APP.isEditor? ' cp-form-iseditor': '')+ ('ontouchstart' in window ? ' cp-no-drag' : ''));
|
||||
var containerDragClass = ('ontouchstart' in window || APP.drag === false) ? ' cp-no-drag' : ''
|
||||
$container.attr('class', 'cp-form-creator-content'+(APP.isEditor? ' cp-form-iseditor': '')+ containerDragClass);
|
||||
|
||||
if (APP.isClosed && content.answers.privateKey && !APP.isEditor && !APP.hasAnswered) {
|
||||
var sframeChan = framework._.sfCommon.getSframeChannel();
|
||||
@ -4023,11 +4023,13 @@ define([
|
||||
// Arrows
|
||||
var upButton = h('button.cp-form-arrow', h('i.fa.fa-arrow-up', {
|
||||
'title': Messages.moveItemUp,
|
||||
'aria-hidden': true
|
||||
'aria-hidden': true,
|
||||
'tabindex': 0
|
||||
}));
|
||||
var downButton = h('button.cp-form-arrow', h('i.fa.fa-arrow-down', {
|
||||
'title': Messages.moveItemDown,
|
||||
'aria-hidden': true
|
||||
'aria-hidden': true,
|
||||
'tabindex': 0
|
||||
}));
|
||||
var shiftBlock = function(direction) {
|
||||
var blockIndex = content.order.indexOf(uid);
|
||||
@ -5137,8 +5139,8 @@ define([
|
||||
|
||||
var toggleOffclass = 'ontouchstart' in window ? 'cp-toggle-active' : undefined;
|
||||
var toggleOnclass = 'ontouchstart' in window ? undefined : 'cp-toggle-active';
|
||||
var toggleDragOff = h(`button#cp-toggle-drag-off.cp-form-view-drag.${toggleOffclass}.fa.fa-arrows`, {'aria-hidden': true, 'title': Messages.toggleArrows});
|
||||
var toggleDragOn = h(`button#cp-toggle-drag-on.cp-form-view-drag.${toggleOnclass}.fa.fa-hand-o-up`, {'aria-hidden': true, 'title': Messages.toggleDrag});
|
||||
var toggleDragOff = h(`button#cp-toggle-drag-off.cp-form-view-drag.${toggleOffclass}.fa.fa-arrows`, {'aria-hidden': true, 'title': Messages.toggleArrows, 'tabindex': 0});
|
||||
var toggleDragOn = h(`button#cp-toggle-drag-on.cp-form-view-drag.${toggleOnclass}.fa.fa-hand-o-up`, {'aria-hidden': true, 'title': Messages.toggleDrag, 'tabindex': 0});
|
||||
const updateDrag = state => {
|
||||
return function () {
|
||||
var $container = $('.cp-form-creator-content');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user