optimized-react-component-library-xyz123 0.18.1 → 0.18.3

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.mjs CHANGED
@@ -932,8 +932,9 @@ var AddFiles = ({
932
932
  const handleRemoveErrors = () => {
933
933
  setErrorMessageAddingFile([]);
934
934
  };
935
+ const questionId = `question-${questionObject.id}`;
935
936
  return /* @__PURE__ */ jsxs9(Fragment11, { children: [
936
- !showPreview && visible && /* @__PURE__ */ jsx11("div", { className: "root-question addFile-question-container", children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
937
+ !showPreview && visible && /* @__PURE__ */ jsx11("div", { id: questionId, className: "root-question addFile-question-container", children: /* @__PURE__ */ jsxs9("div", { role: "group", children: [
937
938
  questionObject.aboutText && /* @__PURE__ */ jsxs9(
938
939
  "p",
939
940
  {
@@ -1935,22 +1936,20 @@ var QuestionGroup = ({
1935
1936
  "aria-errormessage": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
1936
1937
  "aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
1937
1938
  children: [
1938
- /* @__PURE__ */ jsxs12("div", { className: "pts-root-group-fieldset-legend-container", children: [
1939
- legendLabel && /* @__PURE__ */ jsxs12("legend", { children: [
1940
- /* @__PURE__ */ jsxs12("span", { children: [
1941
- legendLabel,
1942
- groupMandatory && /* @__PURE__ */ jsx14("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
1943
- ] }),
1944
- firstQuestion.hasValidationError && /* @__PURE__ */ jsxs12("span", { className: "sr-only", children: [
1945
- "Valideringsfel. ",
1946
- firstQuestion.validationDefaultMessesege
1947
- ] })
1939
+ legendLabel && /* @__PURE__ */ jsxs12("legend", { children: [
1940
+ /* @__PURE__ */ jsxs12("span", { children: [
1941
+ legendLabel,
1942
+ groupMandatory && /* @__PURE__ */ jsx14("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
1948
1943
  ] }),
1949
- firstQuestion.hasValidationError && /* @__PURE__ */ jsxs12("div", { className: "pts-root-error", id: firstQuestion.id + "-error", children: [
1950
- /* @__PURE__ */ jsx14("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
1951
- /* @__PURE__ */ jsx14("span", { className: "errorText", children: firstQuestion.validationDefaultMessesege })
1944
+ firstQuestion.hasValidationError && /* @__PURE__ */ jsxs12("span", { className: "sr-only", children: [
1945
+ "Valideringsfel. ",
1946
+ firstQuestion.validationDefaultMessesege
1952
1947
  ] })
1953
1948
  ] }),
1949
+ firstQuestion.hasValidationError && /* @__PURE__ */ jsxs12("div", { className: "pts-root-error", id: firstQuestion.id + "-error", children: [
1950
+ /* @__PURE__ */ jsx14("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
1951
+ /* @__PURE__ */ jsx14("span", { className: "errorText", children: firstQuestion.validationDefaultMessesege })
1952
+ ] }),
1954
1953
  groupQuestions
1955
1954
  ]
1956
1955
  }
@@ -3002,7 +3001,7 @@ var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
3002
3001
  import { Fragment as Fragment17, jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
3003
3002
  var FormStatusMessagesScreenReader = ({ formStatus }) => {
3004
3003
  return /* @__PURE__ */ jsxs23(Fragment17, { children: [
3005
- /* @__PURE__ */ jsx29("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ jsx29("span", { className: "mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
3004
+ /* @__PURE__ */ jsx29("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ jsx29("span", { className: "pts-root-mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
3006
3005
  /* @__PURE__ */ jsx29("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
3007
3006
  ] });
3008
3007
  };