Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xblock-drag-and-drop-v2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
xblock-drag-and-drop-v2
Commits
d20adb7e
Commit
d20adb7e
authored
Dec 07, 2016
by
E. Kolpakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TNL-6026] Item bank SR help text moved to ARIA-label + appropriate role is set up.
parent
5bc7c901
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
drag_and_drop_v2/public/js/drag_and_drop.js
+10
-8
No files found.
drag_and_drop_v2/public/js/drag_and_drop.js
View file @
d20adb7e
...
@@ -519,14 +519,17 @@ function DragAndDropTemplates(configuration) {
...
@@ -519,14 +519,17 @@ function DragAndDropTemplates(configuration) {
var
is_item_placed
=
function
(
i
)
{
return
i
.
is_placed
;
};
var
is_item_placed
=
function
(
i
)
{
return
i
.
is_placed
;
};
var
items_placed
=
$
.
grep
(
ctx
.
items
,
is_item_placed
);
var
items_placed
=
$
.
grep
(
ctx
.
items
,
is_item_placed
);
var
items_in_bank
=
$
.
grep
(
ctx
.
items
,
is_item_placed
,
true
);
var
items_in_bank
=
$
.
grep
(
ctx
.
items
,
is_item_placed
,
true
);
var
item_bank_properties
=
{};
var
item_bank_properties
=
{
attributes
:
{
'role'
:
'group'
,
'aria-label'
:
gettext
(
'Item Bank'
)
}
};
if
(
ctx
.
item_bank_focusable
)
{
if
(
ctx
.
item_bank_focusable
)
{
item_bank_properties
.
attributes
=
{
item_bank_properties
.
attributes
[
'tabindex'
]
=
0
;
'tabindex'
:
0
,
item_bank_properties
.
attributes
[
'dropzone'
]
=
'move'
;
'dropzone'
:
'move'
,
item_bank_properties
.
attributes
[
'aria-dropeffect'
]
=
'move'
;
'aria-dropeffect'
:
'move'
,
item_bank_properties
.
attributes
[
'role'
]
=
'button'
;
'role'
:
'button'
};
}
}
return
(
return
(
h
(
'section.themed-xblock.xblock--drag-and-drop'
,
[
h
(
'section.themed-xblock.xblock--drag-and-drop'
,
[
...
@@ -539,7 +542,6 @@ function DragAndDropTemplates(configuration) {
...
@@ -539,7 +542,6 @@ function DragAndDropTemplates(configuration) {
h
(
'div'
,
{
'className'
:
'sr'
},
[
forwardKeyboardHelpButtonTemplate
(
ctx
)]),
h
(
'div'
,
{
'className'
:
'sr'
},
[
forwardKeyboardHelpButtonTemplate
(
ctx
)]),
h
(
'section.drag-container'
,
{},
[
h
(
'section.drag-container'
,
{},
[
h
(
'div.item-bank'
,
item_bank_properties
,
[
h
(
'div.item-bank'
,
item_bank_properties
,
[
h
(
'p'
,
{
className
:
'zone-description sr'
},
gettext
(
'Item Bank'
)),
renderCollection
(
itemTemplate
,
items_in_bank
,
ctx
),
renderCollection
(
itemTemplate
,
items_in_bank
,
ctx
),
renderCollection
(
itemPlaceholderTemplate
,
items_placed
,
ctx
)
renderCollection
(
itemPlaceholderTemplate
,
items_placed
,
ctx
)
]),
]),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment