syncing icon class syntax + semantically hiding changed icons from assistive tech
TNL-1137
This commit is contained in:
committed by
Andy Armstrong
parent
f58e96a2fa
commit
d556cdd586
@@ -79,7 +79,7 @@ var visibleToStaffOnly = visibilityState === 'staff_only';
|
||||
<% } %>
|
||||
<% if (hasContentGroupComponents) { %>
|
||||
<p class="note-visibility">
|
||||
<i class="icon icon-eye-open"></i>
|
||||
<i class="icon fa fa-eye" aria-hidden="true"></i>
|
||||
<span class="note-copy"><%= gettext("Some content in this unit is only visible to particular groups") %></span>
|
||||
</p>
|
||||
<% } %>
|
||||
@@ -87,9 +87,9 @@ var visibleToStaffOnly = visibilityState === 'staff_only';
|
||||
<li class="action-inline">
|
||||
<a href="" class="action-staff-lock" role="button" aria-pressed="<%= hasExplicitStaffLock %>">
|
||||
<% if (hasExplicitStaffLock) { %>
|
||||
<i class="icon fa fa-check-square-o"></i>
|
||||
<i class="icon fa fa-check-square-o" aria-hidden="true"></i>
|
||||
<% } else { %>
|
||||
<i class="icon fa fa-square-o"></i>
|
||||
<i class="icon fa fa-square-o" aria-hidden="true"></i>
|
||||
<% } %>
|
||||
<%= gettext('Hide from students') %>
|
||||
</a>
|
||||
|
||||
@@ -83,7 +83,7 @@ messages = json.dumps(xblock.validate().to_json())
|
||||
</li>
|
||||
<li class="action-item action-visibility">
|
||||
<a href="#" data-tooltip="${_("Visibility Settings")}" class="visibility-button action-button">
|
||||
<i class="icon-eye-open"></i>
|
||||
<i class="icon fa fa-eye" aria-hidden="true"></i>
|
||||
<span class="sr">${_("Visibility")}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
|
||||
<div class="modal-section visibility-summary">
|
||||
<div class="summary-message summary-message-warning visibility-summary-message">
|
||||
<i class="icon icon-warning-sign"></i>
|
||||
<p class="copy">This component is contained in a unit that is hidden from students. Component visibility settings are overridden by the unit visibility settings.</p>
|
||||
<i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
<p class="copy"><span class="sr">Warning: </span>This component is contained in a unit that is hidden from students. Component visibility settings are overridden by the unit visibility settings.</p>
|
||||
</div>
|
||||
|
||||
<!-- NOTE: use when no group configuration has been set -->
|
||||
|
||||
@@ -27,8 +27,17 @@ is_staff_locked = ancestor_has_staff_lock(xblock)
|
||||
</div>
|
||||
% elif is_staff_locked:
|
||||
<div class="summary-message summary-message-warning visibility-summary-message">
|
||||
<i class="icon icon-warning-sign"></i>
|
||||
<p class="copy">${_('The Unit this component is contained in is hidden from students. Visibility settings here will be trumped by this.')}</p>
|
||||
<i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
<p class="copy">
|
||||
## Translators: Any text between {screen_reader_start} and {screen_reader_end} is only read by screen readers and never shown in the browser.
|
||||
${_(
|
||||
"{screen_reader_start}Warning:{screen_reader_end} The Unit this component is contained in is hidden from students. Visibility settings here will be trumped by this."
|
||||
).format(
|
||||
screen_reader_start='<span class="sr">',
|
||||
screen_reader_end='</span>',
|
||||
)
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
% endif
|
||||
</div>
|
||||
|
||||
@@ -112,7 +112,8 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
|
||||
self.cohort_management_page.select_cohort(self.manual_cohort_name)
|
||||
self.assertIsNone(self.cohort_management_page.get_cohort_associated_content_group())
|
||||
self.assertEqual(
|
||||
"No content groups exist. Create a content group to associate with cohort groups. Create a content group",
|
||||
"Warning:\nNo content groups exist. "
|
||||
"Create a content group to associate with cohort groups. Create a content group",
|
||||
self.cohort_management_page.get_cohort_related_content_group_message()
|
||||
)
|
||||
self.assertFalse(self.cohort_management_page.select_content_group_radio_button())
|
||||
@@ -616,7 +617,7 @@ class CohortContentGroupAssociationTest(UniqueCourseTest, CohortTestMixin):
|
||||
self.cohort_management_page.get_all_content_groups()
|
||||
)
|
||||
self.assertEqual(
|
||||
"The previously selected content group was deleted. Select another content group.",
|
||||
"Warning:\nThe previously selected content group was deleted. Select another content group.",
|
||||
self.cohort_management_page.get_cohort_related_content_group_message()
|
||||
)
|
||||
self.cohort_management_page.set_cohort_associated_content_group("Pears")
|
||||
|
||||
@@ -646,7 +646,7 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
|
||||
cohortsView.$('.tab-settings a').click();
|
||||
expect(cohortsView.$('option.option-unavailable').text().trim()).toBe('Deleted Content Group');
|
||||
expect(cohortsView.$('.copy-error').text().trim()).toBe(
|
||||
'The previously selected content group was deleted. Select another content group.'
|
||||
'Warning: The previously selected content group was deleted. Select another content group.'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -687,13 +687,14 @@ define(['backbone', 'jquery', 'js/common_helpers/ajax_helpers', 'js/common_helpe
|
||||
});
|
||||
|
||||
it("shows an error message when no content groups are specified", function () {
|
||||
var message;
|
||||
createCohortsView(this, {selectCohort: 1, contentGroups: []});
|
||||
cohortsView.$('.tab-settings a').click();
|
||||
expect(cohortsView.$('.radio-yes').prop('disabled')).toBeTruthy();
|
||||
expect(cohortsView.$('.msg-inline').text().trim()).toBe(
|
||||
'No content groups exist. Create a content group to associate with cohort groups. ' +
|
||||
'Create a content group'
|
||||
);
|
||||
message = cohortsView.$('.msg-inline').text().trim();
|
||||
expect(message).toContain('Warning: No content groups exist.');
|
||||
expect(message).toContain('Create a content group to associate with cohort groups.');
|
||||
expect(message).toContain('Create a content group');
|
||||
expect(
|
||||
cohortsView.$('.msg-inline a').attr('href'),
|
||||
MOCK_STUDIO_GROUP_CONFIGURATIONS_URL
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
define(['backbone', 'jquery', 'js/instructor_dashboard/ecommerce', 'js/common_helpers/template_helpers'],
|
||||
function (Backbone, $, ExpiryCouponView, TemplateHelpers) {
|
||||
define(['backbone', 'jquery', 'js/instructor_dashboard/ecommerce'],
|
||||
function (Backbone, $, ExpiryCouponView) {
|
||||
'use strict';
|
||||
var expiryCouponView, createExpiryCoupon;
|
||||
var expiryCouponView;
|
||||
describe("edx.instructor_dashboard.ecommerce.ExpiryCouponView", function() {
|
||||
beforeEach(function() {
|
||||
setFixtures('<li class="field full-width" id="add-coupon-modal-field-expiry"><input id="expiry-check" type="checkbox"/><label for="expiry-check"></label><input type="text" id="coupon_expiration_date" class="field" name="expiration_date" aria-required="true"/></li>')
|
||||
setFixtures('<li class="field full-width" id="add-coupon-modal-field-expiry"><input id="expiry-check" type="checkbox"/><label for="expiry-check"></label><input type="text" id="coupon_expiration_date" class="field" name="expiration_date" aria-required="true"/></li>');
|
||||
expiryCouponView = new ExpiryCouponView();
|
||||
});
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="form-submit button action-primary action-view">
|
||||
<i class="button-icon icon fa fa-plus"></i> <%- gettext('Add Students') %>
|
||||
<i class="button-icon icon fa fa-plus" aria-hidden="true"></i> <%- gettext('Add Students') %>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -71,14 +71,41 @@
|
||||
|
||||
<% if (hasSelectedContentGroup && !foundSelected) { %>
|
||||
<div class="msg-inline">
|
||||
<p class="copy-error"><i class="icon icon-warning-sign"></i><%- gettext("The previously selected content group was deleted. Select another content group.") %></p>
|
||||
<p class="copy-error">
|
||||
<i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
<%=
|
||||
interpolate(
|
||||
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.
|
||||
'%(screen_reader_start)sWarning:%(screen_reader_end)s The previously selected content group was deleted. Select another content group.',
|
||||
{
|
||||
screen_reader_start: '<span class="sr">',
|
||||
screen_reader_end: '</span>'
|
||||
},
|
||||
true
|
||||
)
|
||||
%>
|
||||
</p>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } else { // no content groups available %>
|
||||
<div class="input-group-other">
|
||||
<div class="msg-inline">
|
||||
<p class="copy-error"><i class="icon icon-warning-sign"></i><%- gettext("No content groups exist. Create a content group to associate with cohort groups.") %> <a class="link-to-group-settings" href="<%- studioGroupConfigurationsUrl %>"><%- gettext("Create a content group") %></a></p>
|
||||
<p class="copy-error">
|
||||
<i class="icon fa fa-exclamation-triangle" aria-hidden="true"></i>
|
||||
<%=
|
||||
interpolate(
|
||||
// Translators: Any text between %(screen_reader_start)s and %(screen_reader_end)s is only read by screen readers and never shown in the browser.
|
||||
'%(screen_reader_start)sWarning:%(screen_reader_end)s No content groups exist. Create a content group to associate with cohort groups.',
|
||||
{
|
||||
screen_reader_start: '<span class="sr">',
|
||||
screen_reader_end: '</span>'
|
||||
},
|
||||
true
|
||||
)
|
||||
%>
|
||||
<a class="link-to-group-settings" href="<%- studioGroupConfigurationsUrl %>"><%- gettext("Create a content group") %></a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
@@ -89,7 +116,7 @@
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="form-submit button action-primary action-save">
|
||||
<i class="icon fa fa-plus"></i>
|
||||
<i class="icon fa fa-plus" aria-hidden="true"></i>
|
||||
<%- gettext('Save') %>
|
||||
</button>
|
||||
<% if (isNewCohort) { %>
|
||||
|
||||
Reference in New Issue
Block a user