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.js CHANGED
@@ -1014,8 +1014,9 @@ var AddFiles = ({
1014
1014
  const handleRemoveErrors = () => {
1015
1015
  setErrorMessageAddingFile([]);
1016
1016
  };
1017
+ const questionId = `question-${questionObject.id}`;
1017
1018
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
1018
- !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "root-question addFile-question-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { role: "group", children: [
1019
+ !showPreview && visible && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id: questionId, className: "root-question addFile-question-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { role: "group", children: [
1019
1020
  questionObject.aboutText && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1020
1021
  "p",
1021
1022
  {
@@ -2014,22 +2015,20 @@ var QuestionGroup = ({
2014
2015
  "aria-errormessage": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
2015
2016
  "aria-describedby": firstQuestion.hasValidationError ? `${firstQuestion.id}-error` : void 0,
2016
2017
  children: [
2017
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "pts-root-group-fieldset-legend-container", children: [
2018
- legendLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("legend", { children: [
2019
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
2020
- legendLabel,
2021
- groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
2022
- ] }),
2023
- firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "sr-only", children: [
2024
- "Valideringsfel. ",
2025
- firstQuestion.validationDefaultMessesege
2026
- ] })
2018
+ legendLabel && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("legend", { children: [
2019
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { children: [
2020
+ legendLabel,
2021
+ groupMandatory && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": true, className: "pts-root-mandatoryAsterisk", children: "*" })
2027
2022
  ] }),
2028
- firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "pts-root-error", id: firstQuestion.id + "-error", children: [
2029
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
2030
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "errorText", children: firstQuestion.validationDefaultMessesege })
2023
+ firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: "sr-only", children: [
2024
+ "Valideringsfel. ",
2025
+ firstQuestion.validationDefaultMessesege
2031
2026
  ] })
2032
2027
  ] }),
2028
+ firstQuestion.hasValidationError && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "pts-root-error", id: firstQuestion.id + "-error", children: [
2029
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-label": "Valideringsfel", className: "errorDot", children: "!" }),
2030
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "errorText", children: firstQuestion.validationDefaultMessesege })
2031
+ ] }),
2033
2032
  groupQuestions
2034
2033
  ]
2035
2034
  }
@@ -3081,7 +3080,7 @@ var ValidationErrorSummaryList_default = ValidationErrorSummaryList;
3081
3080
  var import_jsx_runtime29 = require("react/jsx-runtime");
3082
3081
  var FormStatusMessagesScreenReader = ({ formStatus }) => {
3083
3082
  return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, { children: [
3084
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
3083
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { "aria-live": "assertive", children: formStatus === "failed" && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "pts-root-mandatoryAsterisk", children: "N\xE5got gick fel, f\xF6rs\xF6k igen senare eller kontakta oss!" }) }),
3085
3084
  /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { "aria-live": "polite", className: "visually-hidden", children: formStatus === "loading" ? "Ditt \xE4rende registreras. Uppdatera eller st\xE4ng inte sidan." : "" })
3086
3085
  ] });
3087
3086
  };