-
+
{
!evaluatedUrl &&
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Number.js b/packages/form-js-viewer/src/render/components/form-fields/Number.js
index 3e837ed5d..581876dab 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Number.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Number.js
@@ -27,7 +27,6 @@ export function Numberfield(props) {
const {
disabled,
errors = [],
- errorMessageId,
domId,
onBlur,
onFocus,
@@ -190,9 +189,12 @@ export function Numberfield(props) {
}
};
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
return
@@ -215,7 +217,9 @@ export function Numberfield(props) {
autoComplete="off"
step={ incrementAmount }
value={ displayValue }
- aria-describedby={ errorMessageId } />
+ aria-describedby={ [ descriptionId, errorMessageId ].join(' ') }
+ required={ required }
+ aria-invalid={ errors.length > 0 } />
{ /* we're disabling tab navigation on both buttons to imitate the native browser behavior of input[type='number'] increment arrows */ }
-
-
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Radio.js b/packages/form-js-viewer/src/render/components/form-fields/Radio.js
index e4f6f8dc8..3041f407f 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Radio.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Radio.js
@@ -23,7 +23,6 @@ export function Radio(props) {
const {
disabled,
errors = [],
- errorMessageId,
domId,
onBlur,
onFocus,
@@ -78,6 +77,9 @@ export function Radio(props) {
onChange: props.onChange
});
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
return
);
})
}
-
-
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Select.js b/packages/form-js-viewer/src/render/components/form-fields/Select.js
index 61864a9f9..7282aadfa 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Select.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Select.js
@@ -14,7 +14,6 @@ export function Select(props) {
const {
disabled,
errors = [],
- errorMessageId,
domId,
onBlur,
onFocus,
@@ -33,6 +32,9 @@ export function Select(props) {
const { required } = validate;
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
const selectProps = {
domId,
disabled,
@@ -43,7 +45,9 @@ export function Select(props) {
value,
onChange,
readonly,
- 'aria-describedby': errorMessageId,
+ required,
+ 'aria-invalid': errors.length > 0,
+ 'aria-describedby': [ descriptionId, errorMessageId ].join(' '),
};
return
{ searchable ? : }
-
-
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Table.js b/packages/form-js-viewer/src/render/components/form-fields/Table.js
index 2d35b0e6a..dc1449785 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Table.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Table.js
@@ -96,7 +96,7 @@ export function Table(props) {
return (
-
+
!disabled && loadState === LOAD_STATES.LOADED && isDropdownExpanded && !isEscapeClosed, [ disabled, isDropdownExpanded, isEscapeClosed, loadState ]);
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
return
+ htmlFor={ domId } />
{ (!disabled && !readonly && !!values.length) &&
}
{ loadState === LOAD_STATES.LOADED &&
@@ -235,7 +237,9 @@ export function Taglist(props) {
onMouseDown={ () => setIsEscapeClose(false) }
onFocus={ onInputFocus }
onBlur={ onInputBlur }
- aria-describedby={ errorMessageId } />
+ aria-describedby={ [ descriptionId, errorMessageId ].join(' ') }
+ required={ required }
+ aria-invalid={ errors.length > 0 } />
{ shouldDisplayDropdown && }
-
-
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Textarea.js b/packages/form-js-viewer/src/render/components/form-fields/Textarea.js
index 204d6215b..07e93d78d 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Textarea.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Textarea.js
@@ -15,7 +15,6 @@ export function Textarea(props) {
const {
disabled,
errors = [],
- errorMessageId,
domId,
onBlur,
onFocus,
@@ -62,9 +61,12 @@ export function Textarea(props) {
autoSizeTextarea(textareaRef.current);
}, []);
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
return
-
-
+ aria-describedby={ [ descriptionId, errorMessageId ].join(' ') }
+ required={ required }
+ aria-invalid={ errors.length > 0 } />
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/Textfield.js b/packages/form-js-viewer/src/render/components/form-fields/Textfield.js
index 5a553ff59..143d1057b 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/Textfield.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/Textfield.js
@@ -14,7 +14,6 @@ export function Textfield(props) {
const {
disabled,
errors = [],
- errorMessageId,
domId,
onBlur,
onFocus,
@@ -53,9 +52,12 @@ export function Textfield(props) {
onFocus && onFocus();
};
+ const descriptionId = `${domId}-description`;
+ const errorMessageId = `${domId}-error-message`;
+
return
@@ -69,10 +71,12 @@ export function Textfield(props) {
onFocus={ onInputFocus }
type="text"
value={ value }
- aria-describedby={ errorMessageId } />
+ aria-describedby={ [ descriptionId, errorMessageId ].join(' ') }
+ required={ required }
+ aria-invalid={ errors.length > 0 } />
-
-
+
+
;
}
diff --git a/packages/form-js-viewer/src/render/components/form-fields/parts/Datepicker.js b/packages/form-js-viewer/src/render/components/form-fields/parts/Datepicker.js
index 5f027b23a..2746a9688 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/parts/Datepicker.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/parts/Datepicker.js
@@ -170,7 +170,7 @@ export function Datepicker(props) {
return
diff --git a/packages/form-js-viewer/src/render/components/form-fields/parts/Timepicker.js b/packages/form-js-viewer/src/render/components/form-fields/parts/Timepicker.js
index 4544b9796..22db982c6 100644
--- a/packages/form-js-viewer/src/render/components/form-fields/parts/Timepicker.js
+++ b/packages/form-js-viewer/src/render/components/form-fields/parts/Timepicker.js
@@ -151,7 +151,7 @@ export function Timepicker(props) {
return