@ukhomeoffice/cop-react-form-renderer 6.15.13 → 6.15.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -129,17 +129,6 @@ const InternalFormRenderer = _ref2 => {
|
|
|
129
129
|
validate
|
|
130
130
|
} = (0, _hooks.useValidation)();
|
|
131
131
|
|
|
132
|
-
// Set focus to header for accessibility, Screen reader to anounce the page heading
|
|
133
|
-
const setFocusToHeading = () => {
|
|
134
|
-
if (document) {
|
|
135
|
-
const header = Array.from(document.getElementsByTagName('h1')).pop();
|
|
136
|
-
if (header && document.activeElement !== header) {
|
|
137
|
-
header.setAttribute('tabIndex', '-1');
|
|
138
|
-
header.focus();
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
};
|
|
142
|
-
|
|
143
132
|
// Need to set submission data when going back
|
|
144
133
|
window.onpopstate = e => {
|
|
145
134
|
var _formState$page;
|
|
@@ -203,11 +192,6 @@ const InternalFormRenderer = _ref2 => {
|
|
|
203
192
|
setHub(_utils.default.Hub.get(type, _hub, components, _objectSpread({}, data)));
|
|
204
193
|
}, [type, _hub, data, components, setHub]);
|
|
205
194
|
|
|
206
|
-
// Set focus to heading for accessibility
|
|
207
|
-
(0, _react.useEffect)(() => {
|
|
208
|
-
setFocusToHeading();
|
|
209
|
-
}, [formState]);
|
|
210
|
-
|
|
211
195
|
// Form state.
|
|
212
196
|
(0, _react.useEffect)(() => {
|
|
213
197
|
var _formState$page2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ukhomeoffice/cop-react-form-renderer",
|
|
3
|
-
"version": "6.15.
|
|
3
|
+
"version": "6.15.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rimraf dist",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"yalc-publish": "yarn compile-with-maps && cp -r src dist/src && yalc publish --push"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@ukhomeoffice/cop-react-components": "4.7.
|
|
20
|
+
"@ukhomeoffice/cop-react-components": "4.7.17",
|
|
21
21
|
"axios": "^0.23.0",
|
|
22
22
|
"dayjs": "^1.11.0",
|
|
23
23
|
"govuk-frontend": "^5.0.0",
|