Addressed review feedback.
This commit is contained in:
@@ -17,7 +17,9 @@ define([], function () {
|
||||
'></div>'
|
||||
);
|
||||
|
||||
state.baseImageEl = $('<img alt="drop target image" />');
|
||||
state.baseImageEl = $('<img />', {
|
||||
alt: gettext("Drop target image")
|
||||
});
|
||||
|
||||
state.baseImageEl.attr('src', state.config.baseImage);
|
||||
state.baseImageEl.load(function () {
|
||||
|
||||
@@ -63,7 +63,6 @@ return {
|
||||
});
|
||||
this.iconEl.appendTo(this.state.baseImageEl.parent());
|
||||
|
||||
|
||||
if (this.labelEl !== null) {
|
||||
if (this.isOriginal === true) {
|
||||
this.labelEl.detach();
|
||||
@@ -83,9 +82,10 @@ return {
|
||||
if (this.isOriginal === true) {
|
||||
this.state.numDraggablesInSlider -= 1;
|
||||
}
|
||||
SR.readText(gettext('dragging out of slider'));
|
||||
// SR: global "screen reader" object in accessibility_tools.js
|
||||
window.SR.readText(gettext('dragging out of slider'));
|
||||
} else {
|
||||
SR.readText(gettext('dragging'));
|
||||
window.SR.readText(gettext('dragging'));
|
||||
}
|
||||
|
||||
this.zIndex = 1000;
|
||||
@@ -107,9 +107,9 @@ return {
|
||||
|
||||
this.checkLandingElement();
|
||||
if (this.inContainer === true) {
|
||||
SR.readText(gettext('dropped in slider'));
|
||||
window.SR.readText(gettext('dropped in slider'));
|
||||
} else {
|
||||
SR.readText(gettext('dropped on target'));
|
||||
window.SR.readText(gettext('dropped on target'));
|
||||
}
|
||||
this.toggleTargets(false);
|
||||
}
|
||||
|
||||
@@ -236,15 +236,13 @@ return {
|
||||
return false;
|
||||
},
|
||||
|
||||
'toggleTargets': function (onoff) {
|
||||
var c1, target, effect;
|
||||
effect = (onoff ? 'move' : undefined);
|
||||
'toggleTargets': function (isEnabled) {
|
||||
var effect = (isEnabled ? 'move' : undefined);
|
||||
this.state.baseImageEl.attr('aria-dropeffect', effect);
|
||||
|
||||
for (c1 = 0; c1 < this.state.targets.length; c1 += 1) {
|
||||
target = this.state.targets[c1];
|
||||
$.each(this.state.targets, function (target) {
|
||||
target.targetEl.attr('aria-dropeffect', effect);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
'snapToTarget': function (target) {
|
||||
|
||||
Reference in New Issue
Block a user