From 9dab9d2c208bee9bb44f92ded3417f7219701fbb Mon Sep 17 00:00:00 2001 From: Harry Rein Date: Mon, 22 Jan 2018 09:38:54 -0500 Subject: [PATCH] a11y issues on upgrade footer. LEARNER-3055 --- lms/static/sass/features/_course-sock.scss | 19 +++++++++---------- .../static/course_experience/js/CourseSock.js | 6 +++++- .../course-sock-fragment.html | 10 +++++----- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/lms/static/sass/features/_course-sock.scss b/lms/static/sass/features/_course-sock.scss index 49f6d56c30..d1e9b83614 100644 --- a/lms/static/sass/features/_course-sock.scss +++ b/lms/static/sass/features/_course-sock.scss @@ -48,6 +48,15 @@ color: $black-t3; position: relative; + h2 { + font-size: 1.5rem; + font-weight: $font-weight-bold; + } + + h3 { + font-size: 1.25rem; + } + @media (max-width: 960px) { .mini-cert { display: none; @@ -63,16 +72,6 @@ width: ($baseline * 13); } - h2 { - font-size: 1.5rem; - font-weight: 700; - } - - h4 { - font-size: 1.25rem; - font-weight: 600; - } - .learner-story-container { display: flex; max-width: 630px; diff --git a/openedx/features/course_experience/static/course_experience/js/CourseSock.js b/openedx/features/course_experience/static/course_experience/js/CourseSock.js index 2c3ad8986d..8ae27cced4 100644 --- a/openedx/features/course_experience/static/course_experience/js/CourseSock.js +++ b/openedx/features/course_experience/static/course_experience/js/CourseSock.js @@ -52,9 +52,13 @@ export class CourseSock { // eslint-disable-line import/prefer-default-export // Open the sock when user clicks to Learn More $toggleActionButton.on('click', () => { const toggleSpeed = 400; - $toggleActionButton.toggleClass('active').toggleClass('aria-expanded'); + $toggleActionButton.toggleClass('active'); $verificationSock.slideToggle(toggleSpeed, fixUpgradeButton); + // Toggle aria-expanded attribute + const newAriaExpandedState = $toggleActionButton.attr('aria-expanded') === 'false'; + $toggleActionButton.attr('aria-expanded', newAriaExpandedState); + // Log open and close events const isOpening = $toggleActionButton.hasClass('active'); const logMessage = isOpening ? 'edx.bi.course.sock.toggle_opened' diff --git a/openedx/features/course_experience/templates/course_experience/course-sock-fragment.html b/openedx/features/course_experience/templates/course_experience/course-sock-fragment.html index 26555a01b5..9aaf44bb46 100644 --- a/openedx/features/course_experience/templates/course_experience/course-sock-fragment.html +++ b/openedx/features/course_experience/templates/course_experience/course-sock-fragment.html @@ -16,20 +16,20 @@ from openedx.features.course_experience import DISPLAY_COURSE_SOCK_FLAG style="display: none" %endif > -

${_('{platform_name} Verified Certificate').format(platform_name=settings.PLATFORM_NAME)}

-

${_('Why upgrade?')}

+

${_('Why upgrade?')}

  • ${_('Official proof of completion')}
  • ${_('Easily shareable certificate')}
  • ${_('Proven motivator to complete the course')}
  • ${_('Certificate purchases help {platform_name} continue to offer free courses').format(platform_name=settings.PLATFORM_NAME)}
-

${_('How it works')}

+

${_('How it works')}

  • ${_('Pay the Verified Certificate upgrade fee')}
  • ${_('Verify your identity with a webcam and government-issued ID')}
  • @@ -37,7 +37,7 @@ from openedx.features.course_experience import DISPLAY_COURSE_SOCK_FLAG
  • ${_('Share your certificate with friends, employers, and others')}
% if settings.PLATFORM_NAME == 'edX': -

${_('edX Learner Stories')}

+

${_('edX Learner Stories')}

Student Image
@@ -57,7 +57,7 @@ from openedx.features.course_experience import DISPLAY_COURSE_SOCK_FLAG
% endif - + Example Certificate Image