optimized-react-component-library-xyz123 0.29.1 → 0.29.2
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.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,7 @@ var InputRadio = ({
|
|
|
40
40
|
{
|
|
41
41
|
"aria-required": question.isQuestionMandatory,
|
|
42
42
|
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
43
|
-
"aria-
|
|
43
|
+
"aria-describedby": question.hasValidationError ? errorId : void 0,
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ jsxs2("legend", { id: `label-${groupId}`, children: [
|
|
46
46
|
question.questionLabel,
|
|
@@ -211,7 +211,7 @@ var CheckboxGroup = ({
|
|
|
211
211
|
{
|
|
212
212
|
"aria-required": question.isQuestionMandatory,
|
|
213
213
|
"aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
|
|
214
|
-
"aria-
|
|
214
|
+
"aria-describedby": question.hasValidationError ? errorId : void 0,
|
|
215
215
|
children: [
|
|
216
216
|
/* @__PURE__ */ jsxs4("legend", { className: "pts-checkboxGroup-legend", id: `label-${groupId}`, children: [
|
|
217
217
|
question.questionLabel,
|
|
@@ -1979,7 +1979,7 @@ var QuestionGroup = ({
|
|
|
1979
1979
|
if (!questions || questions.length === 0) {
|
|
1980
1980
|
return null;
|
|
1981
1981
|
}
|
|
1982
|
-
const firstQuestion = questions[0];
|
|
1982
|
+
const firstQuestion = questions.find((question) => question.visible === true) || questions[0];
|
|
1983
1983
|
const errorId = firstQuestion.id + "-error";
|
|
1984
1984
|
const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
|
|
1985
1985
|
useEffect11(() => {
|