Commit 3468ca34 by Mark Sadecki Committed by GitHub

Merge pull request #14121 from edx/cptvitamin/AC-680

removes redundant alt attribute value
parents 388ed865 33949571
...@@ -156,6 +156,10 @@ class DashboardPage(PageObject): ...@@ -156,6 +156,10 @@ class DashboardPage(PageObject):
""" Retrieves the specified social sharing widget by its classification """ """ Retrieves the specified social sharing widget by its classification """
return self.q(css='a.action-{}'.format(widget_name)) return self.q(css='a.action-{}'.format(widget_name))
def get_profile_img(self):
""" Retrieves the user's profile image """
return self.q(css='img.user-image-frame')
def get_courses(self): def get_courses(self):
""" """
Get all courses shown in the dashboard Get all courses shown in the dashboard
......
...@@ -305,6 +305,13 @@ class LmsDashboardPageTest(BaseLmsDashboardTest): ...@@ -305,6 +305,13 @@ class LmsDashboardPageTest(BaseLmsDashboardTest):
# and course starts within 5 days # and course starts within 5 days
self.assertEqual(course_date, expected_course_date) self.assertEqual(course_date, expected_course_date)
def test_profile_img_alt_empty(self):
"""
Validate value of profile image alt attribue is null
"""
profile_img = self.dashboard_page.get_profile_img()
self.assertEqual(profile_img.attrs('alt')[0], '')
@attr('a11y') @attr('a11y')
class LmsDashboardA11yTest(BaseLmsDashboardTestMultiple): class LmsDashboardA11yTest(BaseLmsDashboardTestMultiple):
......
...@@ -49,7 +49,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_ ...@@ -49,7 +49,7 @@ from openedx.core.djangoapps.user_api.accounts.image_helpers import get_profile_
username = self.real_user.username username = self.real_user.username
profile_image_url = get_profile_image_urls_for_user(self.real_user)['medium'] profile_image_url = get_profile_image_urls_for_user(self.real_user)['medium']
%> %>
<img class="user-image-frame" src="${profile_image_url}" alt="${_('Profile image for {username}').format(username=username)}"> <img class="user-image-frame" src="${profile_image_url}" alt="">
<div class="label-username">${username}</div> <div class="label-username">${username}</div>
</a> </a>
</li> </li>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment