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
72fcd5b1
Commit
72fcd5b1
authored
Jun 16, 2015
by
Brian Talbot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8377 from edx/talbs/web-certs-a11y
Web Certificates: Addressing a11y feedback
parents
585eaf1c
07307cb4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
27 deletions
+23
-27
lms/djangoapps/certificates/models.py
+2
-4
lms/djangoapps/certificates/tests/test_models.py
+4
-8
lms/djangoapps/certificates/views.py
+0
-1
lms/templates/certificates/_accomplishment-banner.html
+7
-6
lms/templates/certificates/_accomplishment-header.html
+4
-2
lms/templates/certificates/_accomplishment-rendering.html
+4
-4
lms/templates/certificates/valid.html
+2
-2
No files found.
lms/djangoapps/certificates/models.py
View file @
72fcd5b1
...
...
@@ -558,12 +558,10 @@ class CertificateHtmlViewConfiguration(ConfigurationModel):
{
"default": {
"url": "http://www.edx.org",
"logo_src": "http://www.edx.org/static/images/logo.png",
"logo_alt": "Valid Certificate"
"logo_src": "http://www.edx.org/static/images/logo.png"
},
"honor": {
"logo_src": "http://www.edx.org/static/images/honor-logo.png",
"logo_alt": "Honor Certificate"
"logo_src": "http://www.edx.org/static/images/honor-logo.png"
}
}
"""
...
...
lms/djangoapps/certificates/tests/test_models.py
View file @
72fcd5b1
...
...
@@ -101,12 +101,10 @@ class CertificateHtmlViewConfigurationTest(TestCase):
self
.
configuration_string
=
"""{
"default": {
"url": "http://www.edx.org",
"logo_src": "http://www.edx.org/static/images/logo.png",
"logo_alt": "Valid Certificate"
"logo_src": "http://www.edx.org/static/images/logo.png"
},
"honor": {
"logo_src": "http://www.edx.org/static/images/honor-logo.png",
"logo_alt": "Honor Certificate"
"logo_src": "http://www.edx.org/static/images/honor-logo.png"
}
}"""
self
.
config
=
CertificateHtmlViewConfiguration
(
configuration
=
self
.
configuration_string
)
...
...
@@ -134,12 +132,10 @@ class CertificateHtmlViewConfigurationTest(TestCase):
expected_config
=
{
"default"
:
{
"url"
:
"http://www.edx.org"
,
"logo_src"
:
"http://www.edx.org/static/images/logo.png"
,
"logo_alt"
:
"Valid Certificate"
"logo_src"
:
"http://www.edx.org/static/images/logo.png"
},
"honor"
:
{
"logo_src"
:
"http://www.edx.org/static/images/honor-logo.png"
,
"logo_alt"
:
"Honor Certificate"
"logo_src"
:
"http://www.edx.org/static/images/honor-logo.png"
}
}
self
.
assertEquals
(
self
.
config
.
get_config
(),
expected_config
)
...
...
lms/djangoapps/certificates/views.py
View file @
72fcd5b1
...
...
@@ -500,7 +500,6 @@ def render_html_view(request, user_id, course_id):
# Translators: This line appears as a byline to a header image and describes the purpose of the page
context
[
'logo_subtitle'
]
=
_
(
"Certificate Validation"
)
context
[
'logo_alt'
]
=
context
.
get
(
'platform_name'
)
invalid_template_path
=
'certificates/invalid.html'
# Kick the user back to the "Invalid" screen if the feature is disabled
...
...
lms/templates/certificates/_accomplishment-banner.html
View file @
72fcd5b1
...
...
@@ -32,26 +32,27 @@
<div
class=
"wrapper-copy-and-actions"
>
<p
class=
"message-copy copy copy-base emphasized"
>
${accomplishment_banner_congrats}
</p>
<div
class=
"message-actions"
>
%if badge:
<p
class=
"sr-only"
>
${_("Share on:")}
</p>
<h3
class=
"sr-only"
>
${_("Take this with you:")}
</h3>
%if badge:
<button
class=
"action action-share-mozillaopenbadges btn btn-overlay btn-small"
>
<img
class=
"icon icon-mozillaopenbadges"
src=
"/static/certificates/images/ico-mozillaopenbadges.png"
alt=
"Mozilla Open Badges Backpack"
>
${_("Add to Mozilla Backpack")}
</button>
%endif
<p
class=
"sr-only"
>
Take this with you:
</p>
%endif
<button
class=
"action action-print btn btn-overlay btn-small"
id=
"action-print-view"
>
<i
class=
"icon fa fa-print"
aria-hidden=
"true"
></i>
${_("Print Certificate")}
</button>
%if linked_in_url:
<a
class=
"action-linkedin-profile"
target=
"_blank"
href=
"${linked_in_url}"
title=
"${_('Add
Certificate
to LinkedIn Profile')}"
title=
"${_('Add to LinkedIn Profile')}"
data-course-id=
"${course_id}"
data-certificate-mode=
"${course_mode}"
>
<img
class=
"action-linkedin-profile-img"
src=
"${static.url('images/linkedin_add_to_profile.png')}"
alt=
"${_('
Share on LinkedIn
')}"
/>
alt=
"${_('
Add to LinkedIn Profile
')}"
/>
</a>
%endif
</div>
...
...
lms/templates/certificates/_accomplishment-header.html
View file @
72fcd5b1
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<div
class=
"wrapper-header"
>
<header
class=
"header-app"
role=
"banner"
>
<h1
class=
"header-app-title"
>
<a
class=
"logo"
href=
"${logo_url}"
>
<img
class=
"logo-img"
src=
"${logo_src}"
alt=
"${
logo_alt
}"
/>
<img
class=
"logo-img"
src=
"${logo_src}"
alt=
"${
_('{platform_name} Home').format(platform_name=settings.PLATFORM_NAME)
}"
/>
</a>
<span
class=
"
title title-sub
sr-only"
>
${logo_subtitle}
</span>
<span
class=
"sr-only"
>
${logo_subtitle}
</span>
</h1>
</header>
...
...
lms/templates/certificates/_accomplishment-rendering.html
View file @
72fcd5b1
...
...
@@ -7,7 +7,7 @@ if certificate_data and certificate_data.get('course_title', ''):
course_mode_class =
course_mode
if
course_mode
else
''
%
>
<
article
class=
"accomplishment accomplishment-main"
>
<
main
class=
"accomplishment accomplishment-main"
>
<div
class=
"wrapper-accomplishment-rendering"
>
<div
class=
"accomplishment-rendering"
>
...
...
@@ -42,7 +42,7 @@ course_mode_class = course_mode if course_mode else ''
% if mode != 'base':
<div
class=
"accomplishment-signatories"
>
<h3
class=
"accomplishment-signatories-title
hd-6
sr-only"
>
${_("Noted by")}
</h3>
<h3
class=
"accomplishment-signatories-title sr-only"
>
${_("Noted by")}
</h3>
<div
class=
"wrapper-signatories"
>
<div
class=
"list-signatories"
>
...
...
@@ -66,7 +66,7 @@ course_mode_class = course_mode if course_mode else ''
</div>
<div
class=
"accomplishment-orgs"
>
<h3
class=
"accomplishment-orgs-title
hd-6
sr-only"
>
${_("Supported by the following organizations")}
</h3>
<h3
class=
"accomplishment-orgs-title sr-only"
>
${_("Supported by the following organizations")}
</h3>
<ul
class=
"wrapper-orgs list-orgs"
>
<li
class=
"wrapper-organization"
>
...
...
@@ -116,4 +116,4 @@ course_mode_class = course_mode if course_mode else ''
</div>
</div>
</
article
>
</
main
>
lms/templates/certificates/valid.html
View file @
72fcd5b1
...
...
@@ -8,8 +8,8 @@
<
%
include
file=
"_accomplishment-rendering.html"
/>
<div
class=
"wrapper-about"
>
<
div
class=
"about
"
>
<
aside
role=
"complementary"
class=
"about"
aria-label=
"About edX Certificates
"
>
<
%
include
file=
"_about-edx.html"
/>
<
%
include
file=
"_about-accomplishments.html"
/>
</
div
>
</
aside
>
</div>
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