Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
edx
edx-platform
Commits
ce976a80
Commit
ce976a80
authored
Sep 28, 2013
by
jmclaus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
All buttons have an ARIA role, name , and state
parent
dfe45d5b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
7 deletions
+54
-7
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
+12
-1
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
+10
-1
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
+10
-1
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
+10
-1
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
+11
-2
lms/templates/video.html
+1
-1
No files found.
common/lib/xmodule/xmodule/js/src/video/04_video_control.js
View file @
ce976a80
...
...
@@ -63,10 +63,21 @@ function () {
state
.
videoControl
.
el
.
addClass
(
'html5'
);
state
.
controlHideTimeout
=
setTimeout
(
state
.
videoControl
.
hideControls
,
state
.
videoControl
.
fadeOutTimeout
);
}
// ARIA
// Let screen readers know these anchors behaves like a button.
// Let screen readers know that:
// these anchors behaves like buttons
state
.
videoControl
.
playPauseEl
.
attr
(
'role'
,
gettext
(
'button'
));
state
.
videoControl
.
fullScreenEl
.
attr
(
'role'
,
gettext
(
'button'
));
// what their names are: (title attribute are set in video.html template):
// Play, Pause
// Fill browser
// what their states are:
state
.
videoControl
.
playPauseEl
.
attr
(
'aria-disabled'
,
'false'
);
state
.
videoControl
.
fullScreenEl
.
attr
(
'aria-disabled'
,
'false'
);
}
// function _bindHandlers(state)
...
...
common/lib/xmodule/xmodule/js/src/video/05_video_quality_control.js
View file @
ce976a80
...
...
@@ -43,9 +43,18 @@ function () {
state
.
videoQualityControl
.
el
.
show
();
state
.
videoQualityControl
.
quality
=
null
;
// ARIA
// Let screen readers know this anchor behaves like a button.
// Let screen readers know that:
// this anchor behaves like a button
state
.
videoQualityControl
.
el
.
attr
(
'role'
,
gettext
(
'button'
));
// what its name is: (title attribute is set in video.html template):
// HD
// what its state is:
state
.
videoQualityControl
.
el
.
attr
(
'aria-disabled'
,
'false'
);
}
// function _bindHandlers(state)
...
...
common/lib/xmodule/xmodule/js/src/video/07_video_volume_control.js
View file @
ce976a80
...
...
@@ -62,9 +62,18 @@ function () {
});
state
.
videoVolumeControl
.
el
.
toggleClass
(
'muted'
,
state
.
videoVolumeControl
.
currentVolume
===
0
);
// ARIA
// Let screen readers know this anchor behaves like a button.
// Let screen readers know that:
// this anchor behaves like a button
state
.
videoVolumeControl
.
buttonEl
.
attr
(
'role'
,
gettext
(
'button'
));
// what its name is: (title attribute is set in video.html template):
state
.
videoVolumeControl
.
buttonEl
.
attr
(
'aria-label'
,
gettext
(
'Volume'
));
// what its state is:
state
.
videoVolumeControl
.
buttonEl
.
attr
(
'aria-disabled'
,
'false'
);
}
/**
...
...
common/lib/xmodule/xmodule/js/src/video/08_video_speed_control.js
View file @
ce976a80
...
...
@@ -79,9 +79,18 @@ function () {
});
state
.
videoSpeedControl
.
setSpeed
(
state
.
speed
);
// ARIA
// Let screen readers know this anchor behaves like a button.
// Let screen readers know that:
// this anchor behaves like a button
state
.
videoSpeedControl
.
el
.
children
(
'a'
).
attr
(
'role'
,
gettext
(
'button'
));
// what its name is: (title attribute is set in video.html template):
state
.
videoSpeedControl
.
el
.
children
(
'a'
).
attr
(
'aria-label'
,
'Speeds'
);
// what its state is:
state
.
videoSpeedControl
.
el
.
children
(
'a'
).
attr
(
'aria-disabled'
,
'false'
);
}
/**
...
...
common/lib/xmodule/xmodule/js/src/video/09_video_caption.js
View file @
ce976a80
...
...
@@ -105,9 +105,18 @@ function () {
this
.
videoCaption
.
hideCaptions
(
true
);
this
.
videoCaption
.
hideSubtitlesEl
.
hide
();
}
// ARIA
// Let screen readers know this anchor behaves like a button.
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'role'
,
gettext
(
'button'
));
// Let screen readers know that:
// this anchor behaves like a button
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'role'
,
gettext
(
'button'
));
// what its name is:
// what its name is: (title attribute is set in video.html template):
// Speeds
// what its state is:
this
.
videoCaption
.
hideSubtitlesEl
.
attr
(
'aria-disabled'
,
'false'
);
}
// function bindHandlers()
...
...
lms/templates/video.html
View file @
ce976a80
...
...
@@ -66,7 +66,7 @@
<a
href=
"#"
class=
"add-fullscreen"
title=
"${_('Fill browser')}"
>
${_('Fill browser')}
</a>
<a
href=
"#"
class=
"quality_control"
title=
"${_('HD')}"
>
${_('HD')}
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"${_('Turn off captions')}"
>
${_('
C
aptions')}
</a>
<a
href=
"#"
class=
"hide-subtitles"
title=
"${_('Turn off captions')}"
>
${_('
Turn off c
aptions')}
</a>
</div>
</div>
</section>
...
...
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