optimized-react-component-library-xyz123 0.1.25 → 0.1.27

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
@@ -1041,10 +1041,24 @@ var RenderQuestionGroup = ({
1041
1041
  }) });
1042
1042
  switch (wrapper) {
1043
1043
  case "fieldset":
1044
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("fieldset", { className: "pts-root-question-group-fieldset", children: [
1045
- legend && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("legend", { children: legend }),
1046
- questions
1047
- ] });
1044
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
1045
+ "fieldset",
1046
+ {
1047
+ className: "pts-root-question-group-fieldset",
1048
+ "aria-required": questionArray[0].isQuestionMandatory,
1049
+ "aria-invalid": questionArray[0].hasValidationError,
1050
+ "aria-errormessage": questionArray[0].questionId + "-error",
1051
+ "aria-describedby": questionArray[0].questionId + "-error",
1052
+ children: [
1053
+ legend && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("legend", { children: legend }),
1054
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "pts-root-error", id: questionArray[0].questionId + "-error", children: questionArray[0].hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
1055
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
1056
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "aria-label": "Felmeddelande.", className: "errorText", children: questionArray[0].validationDefaultMessesege })
1057
+ ] }) }),
1058
+ questions
1059
+ ]
1060
+ }
1061
+ );
1048
1062
  case "section":
1049
1063
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("section", { className: "pts-root-question-group-section", children: questions });
1050
1064
  case "div":
package/dist/index.mjs CHANGED
@@ -977,10 +977,24 @@ var RenderQuestionGroup = ({
977
977
  }) });
978
978
  switch (wrapper) {
979
979
  case "fieldset":
980
- return /* @__PURE__ */ jsxs7("fieldset", { className: "pts-root-question-group-fieldset", children: [
981
- legend && /* @__PURE__ */ jsx7("legend", { children: legend }),
982
- questions
983
- ] });
980
+ return /* @__PURE__ */ jsxs7(
981
+ "fieldset",
982
+ {
983
+ className: "pts-root-question-group-fieldset",
984
+ "aria-required": questionArray[0].isQuestionMandatory,
985
+ "aria-invalid": questionArray[0].hasValidationError,
986
+ "aria-errormessage": questionArray[0].questionId + "-error",
987
+ "aria-describedby": questionArray[0].questionId + "-error",
988
+ children: [
989
+ legend && /* @__PURE__ */ jsx7("legend", { children: legend }),
990
+ /* @__PURE__ */ jsx7("div", { className: "pts-root-error", id: questionArray[0].questionId + "-error", children: questionArray[0].hasValidationError && /* @__PURE__ */ jsxs7(Fragment7, { children: [
991
+ /* @__PURE__ */ jsx7("span", { "aria-hidden": true, className: "errorDot", children: "!" }),
992
+ /* @__PURE__ */ jsx7("span", { "aria-label": "Felmeddelande.", className: "errorText", children: questionArray[0].validationDefaultMessesege })
993
+ ] }) }),
994
+ questions
995
+ ]
996
+ }
997
+ );
984
998
  case "section":
985
999
  return /* @__PURE__ */ jsx7("section", { className: "pts-root-question-group-section", children: questions });
986
1000
  case "div":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "optimized-react-component-library-xyz123",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "A modern React component library using TypeScript with React 19 support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",