Replace all visually-hidden classes

These have been replaced:

https://design-system.service.gov.uk/get-started/updating-your-code/#helper-class-names
This commit is contained in:
Tom Byers
2019-10-21 15:18:25 +01:00
parent c06c8c0e5c
commit c1b8fb7531
17 changed files with 31 additions and 31 deletions

View File

@@ -53,7 +53,7 @@
}
Footer.prototype.buttonContent = {
change: (fieldLabel) => `Choose ${fieldLabel}s`,
done: (fieldLabel) => `Done<span class="visuallyhidden"> choosing ${fieldLabel}s</span>`
done: (fieldLabel) => `Done<span class="govuk-visually-hidden"> choosing ${fieldLabel}s</span>`
};
Footer.prototype.getEl = function (expanded) {
const buttonState = expanded ? 'done' : 'change';
@@ -118,7 +118,7 @@
this.$heading = $(`<h${headingLevel} class="heading-small">${this.legendText}</h${headingLevel}>`);
this.$fieldset.before(this.$heading);
this.$fieldset.find('legend').addClass('visuallyhidden');
this.$fieldset.find('legend').addClass('govuk-visually-hidden');
};
CollapsibleCheckboxes.prototype.expand = function(e) {
if (e !== undefined) { e.preventDefault(); }

View File

@@ -28,7 +28,7 @@
ListEntry.prototype.entryTemplate = Hogan.compile(
'<div class="list-entry">' +
'<label for="{{{id}}}" class="text-box-number-label">' +
'<span class="visuallyhidden">{{listItemName}} number </span>{{number}}.' +
'<span class="govuk-visually-hidden">{{listItemName}} number </span>{{number}}.' +
'</label>' +
'<input' +
' name="{{name}}-{{index}}"' +
@@ -38,7 +38,7 @@
'/>' +
'{{#button}}' +
'<button type="button" class="button-secondary list-entry-remove">' +
'Remove<span class="visuallyhidden"> {{listItemName}} number {{number}}</span>' +
'Remove<span class="govuk-visually-hidden"> {{listItemName}} number {{number}}</span>' +
'</button>' +
'{{/button}}' +
'</div>'

View File

@@ -127,7 +127,7 @@
});
if (opts.hasOwnProperty('nonvisualText')) {
$btn.append(`<span class="visuallyhidden"> ${opts.nonvisualText}</span>`);
$btn.append(`<span class="govuk-visually-hidden"> ${opts.nonvisualText}</span>`);
}
return $btn;