optimized-react-component-library-xyz123 0.28.8 → 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 CHANGED
@@ -122,7 +122,7 @@ var InputRadio = ({
122
122
  {
123
123
  "aria-required": question.isQuestionMandatory,
124
124
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
125
- "aria-errormessage": question.hasValidationError ? errorId : void 0,
125
+ "aria-describedby": question.hasValidationError ? errorId : void 0,
126
126
  children: [
127
127
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("legend", { id: `label-${groupId}`, children: [
128
128
  question.questionLabel,
@@ -293,7 +293,7 @@ var CheckboxGroup = ({
293
293
  {
294
294
  "aria-required": question.isQuestionMandatory,
295
295
  "aria-invalid": question.hasValidationError ? question.hasValidationError : void 0,
296
- "aria-errormessage": question.hasValidationError ? errorId : void 0,
296
+ "aria-describedby": question.hasValidationError ? errorId : void 0,
297
297
  children: [
298
298
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("legend", { className: "pts-checkboxGroup-legend", id: `label-${groupId}`, children: [
299
299
  question.questionLabel,
@@ -2058,7 +2058,7 @@ var QuestionGroup = ({
2058
2058
  if (!questions || questions.length === 0) {
2059
2059
  return null;
2060
2060
  }
2061
- const firstQuestion = questions[0];
2061
+ const firstQuestion = questions.find((question) => question.visible === true) || questions[0];
2062
2062
  const errorId = firstQuestion.id + "-error";
2063
2063
  const groupMandatory = (_a = firstQuestion.validationType) == null ? void 0 : _a.find((e) => e.startsWith("groupCheck-"));
2064
2064
  (0, import_react12.useEffect)(() => {