feat: Update link styling (#36348)

This commit is contained in:
Rodrigo Martin
2025-03-11 12:07:29 -03:00
committed by GitHub
parent 04085af1ef
commit 91acd3a26f
4 changed files with 5 additions and 4 deletions

View File

@@ -103,7 +103,8 @@ class TestInstructorDashboard(ModuleStoreTestCase, LoginEnrollmentTestCase, XssT
Returns expected dashboard demographic message with link to Insights.
"""
return 'For analytics about your course, go to <a href="http://example.com/courses/{}" ' \
'rel="noopener" target="_blank">Example</a>.'.format(str(self.course.id))
'rel="noopener" target="_blank">Example<span class="sr-only">Opens in a new tab</span>' \
'</a>.'.format(str(self.course.id))
def test_instructor_tab(self):
"""

View File

@@ -507,7 +507,7 @@
return edx.HtmlUtils.joinHtml(edx.HtmlUtils.HTML(
'<a rel="noopener" target="_blank" href="'), dataContext.url,
edx.HtmlUtils.HTML('">'), dataContext.name,
edx.HtmlUtils.HTML('</a>'));
edx.HtmlUtils.HTML('<span class="sr-only">Opens in a new tab</span></a>'));
}
}
];

View File

@@ -18,7 +18,7 @@ from openedx.core.djangolib.markup import HTML, Text
))
),
analytics_dashboard_name=settings.ANALYTICS_DASHBOARD_NAME,
link_end=HTML('</a>')
link_end=HTML('<span class="sr-only">Opens in a new tab</span></a>')
)}
</em>
</p>

View File

@@ -10,7 +10,7 @@ from openedx.core.djangolib.markup import HTML, Text
%if 'communications_mfe_url' in section_data:
<p>
<em>
${_("To use the email tool, visit the")} <a href="${section_data['communications_mfe_url']}" target="_blank" rel="noopener">${_("new experience")}</a>.
${_("To use the email tool, visit the")} <a href="${section_data['communications_mfe_url']}" target="_blank" rel="noopener">${_("new experience")}<span class="sr-only">${Text(_("Opens in a new tab"))}</span></a>.
</em>
</p>
%else: