@elementor/editor-audits 4.4.0-1101 → 4.4.0-1102
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 +427 -411
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +425 -415
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/audit-panel.tsx +7 -1
- package/src/components/audit-statuses-section.tsx +65 -0
- package/src/components/category-icons.ts +4 -10
- package/src/components/pages/issues-page.tsx +24 -7
- package/src/components/pages/overview-page.tsx +6 -94
- package/src/components/promotions.tsx +3 -2
- package/src/components/report-shell.tsx +43 -39
- package/src/components/severity-filter-chips.tsx +57 -0
- package/src/components/severity-icons.tsx +2 -2
- package/src/constants.ts +1 -1
- package/src/utils/severity-counts.ts +2 -25
package/dist/index.mjs
CHANGED
|
@@ -6,18 +6,18 @@ import { __registerSlice as registerSlice } from "@elementor/store";
|
|
|
6
6
|
import { utilitiesMenu } from "@elementor/editor-app-bar";
|
|
7
7
|
|
|
8
8
|
// src/hooks/use-audit-toggle-props.ts
|
|
9
|
-
import { ShieldCheckIcon as
|
|
10
|
-
import { __ as
|
|
9
|
+
import { ShieldCheckIcon as ShieldCheckIcon3 } from "@elementor/icons";
|
|
10
|
+
import { __ as __24 } from "@wordpress/i18n";
|
|
11
11
|
|
|
12
12
|
// src/editor-panel.tsx
|
|
13
13
|
import { createFloatingPanel } from "@elementor/editor-floating-panels";
|
|
14
14
|
|
|
15
15
|
// src/components/audit-panel.tsx
|
|
16
|
-
import * as
|
|
16
|
+
import * as React25 from "react";
|
|
17
17
|
import { getCurrentDocumentId as getCurrentDocumentId2 } from "@elementor/editor-elements";
|
|
18
18
|
import { FloatingPanelBody, FloatingPanelFooter, FloatingPanelHeader } from "@elementor/editor-floating-panels";
|
|
19
|
-
import { Box as
|
|
20
|
-
import { __ as
|
|
19
|
+
import { Box as Box21, Button as Button5, Typography as Typography16 } from "@elementor/ui";
|
|
20
|
+
import { __ as __23 } from "@wordpress/i18n";
|
|
21
21
|
|
|
22
22
|
// src/hooks/use-audit-report.ts
|
|
23
23
|
import { useEffect } from "react";
|
|
@@ -134,7 +134,7 @@ var CATEGORY_LABELS = {
|
|
|
134
134
|
seo: __("SEO", "elementor"),
|
|
135
135
|
accessibility: __("Accessibility", "elementor"),
|
|
136
136
|
performance: __("Performance", "elementor"),
|
|
137
|
-
compliance: __("
|
|
137
|
+
compliance: __("Site compliance", "elementor")
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
// src/utils/audit-status-summary.ts
|
|
@@ -733,10 +733,10 @@ function WelcomePage() {
|
|
|
733
733
|
}
|
|
734
734
|
|
|
735
735
|
// src/components/report-shell.tsx
|
|
736
|
-
import * as
|
|
737
|
-
import { useState as
|
|
738
|
-
import { Box as
|
|
739
|
-
import { __ as
|
|
736
|
+
import * as React24 from "react";
|
|
737
|
+
import { useState as useState5 } from "react";
|
|
738
|
+
import { Box as Box20, Divider as Divider3, Tab, Tabs } from "@elementor/ui";
|
|
739
|
+
import { __ as __22 } from "@wordpress/i18n";
|
|
740
740
|
|
|
741
741
|
// src/components/pages/all-audits-page.tsx
|
|
742
742
|
import * as React12 from "react";
|
|
@@ -795,7 +795,7 @@ function SubpageHeader({ title, onBack, backLabel, icon }) {
|
|
|
795
795
|
import * as React11 from "react";
|
|
796
796
|
import { useState as useState3 } from "react";
|
|
797
797
|
import { getElementIcon, getElementTitle } from "@elementor/editor-elements";
|
|
798
|
-
import { AlertCircleIcon as AlertCircleIcon2, BulbIcon, CheckIcon, ChevronDownIcon as ChevronDownIcon2, EyeIcon, HelpIcon } from "@elementor/icons";
|
|
798
|
+
import { AlertCircleIcon as AlertCircleIcon2, BulbIcon as BulbIcon2, CheckIcon, ChevronDownIcon as ChevronDownIcon2, EyeIcon, HelpIcon } from "@elementor/icons";
|
|
799
799
|
import { Alert, AlertTitle, Box as Box7, Collapse as Collapse2, IconButton as IconButton5, Tooltip as Tooltip3, Typography as Typography6 } from "@elementor/ui";
|
|
800
800
|
import { __ as __11 } from "@wordpress/i18n";
|
|
801
801
|
|
|
@@ -898,11 +898,11 @@ function FixViolationWithAngie({ prompt }) {
|
|
|
898
898
|
|
|
899
899
|
// src/components/severity-icons.tsx
|
|
900
900
|
import * as React8 from "react";
|
|
901
|
-
import { AlertCircleIcon, AlertTriangleFilledIcon,
|
|
901
|
+
import { AlertCircleIcon, AlertTriangleFilledIcon, BulbIcon } from "@elementor/icons";
|
|
902
902
|
var SEVERITY_CONFIG = {
|
|
903
903
|
error: { Icon: AlertTriangleFilledIcon, color: "error" },
|
|
904
904
|
warning: { Icon: AlertCircleIcon, color: "warning" },
|
|
905
|
-
info: { Icon:
|
|
905
|
+
info: { Icon: BulbIcon, color: "info" }
|
|
906
906
|
};
|
|
907
907
|
function SeverityIcon({ severity }) {
|
|
908
908
|
const { Icon, color } = SEVERITY_CONFIG[severity];
|
|
@@ -1005,7 +1005,7 @@ function ViolationRow({ audit: audit23, skipReason, violations }) {
|
|
|
1005
1005
|
{
|
|
1006
1006
|
severity: "info",
|
|
1007
1007
|
sx: { p: 1 },
|
|
1008
|
-
icon: /* @__PURE__ */ React11.createElement(
|
|
1008
|
+
icon: /* @__PURE__ */ React11.createElement(BulbIcon2, { fontSize: "small", color: "info", "aria-hidden": true })
|
|
1009
1009
|
},
|
|
1010
1010
|
/* @__PURE__ */ React11.createElement(AlertTitle, null, /* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, __11("How to resolve", "elementor"))),
|
|
1011
1011
|
/* @__PURE__ */ React11.createElement(Typography6, { variant: "caption", component: "p", color: "text.secondary" }, audit23.fixHint)
|
|
@@ -1099,19 +1099,13 @@ import { Box as Box9 } from "@elementor/ui";
|
|
|
1099
1099
|
import { __ as __13 } from "@wordpress/i18n";
|
|
1100
1100
|
|
|
1101
1101
|
// src/components/category-icons.ts
|
|
1102
|
-
import {
|
|
1103
|
-
ElementorAccessibilityIcon,
|
|
1104
|
-
FilterIcon,
|
|
1105
|
-
HeartHandShakeIcon,
|
|
1106
|
-
Settings2Icon,
|
|
1107
|
-
ShieldHalfFilledIcon
|
|
1108
|
-
} from "@elementor/icons";
|
|
1102
|
+
import { BoltIcon, ElementorAccessibilityIcon, FileSearchIcon, Settings2Icon, ShieldCheckIcon as ShieldCheckIcon2 } from "@elementor/icons";
|
|
1109
1103
|
var CATEGORY_ICONS = {
|
|
1110
1104
|
"best-practices": Settings2Icon,
|
|
1111
|
-
seo:
|
|
1105
|
+
seo: FileSearchIcon,
|
|
1112
1106
|
accessibility: ElementorAccessibilityIcon,
|
|
1113
|
-
performance:
|
|
1114
|
-
compliance:
|
|
1107
|
+
performance: BoltIcon,
|
|
1108
|
+
compliance: ShieldCheckIcon2
|
|
1115
1109
|
};
|
|
1116
1110
|
|
|
1117
1111
|
// src/components/pages/category-page.tsx
|
|
@@ -1139,12 +1133,13 @@ function CategoryPage({ category, report, onBack }) {
|
|
|
1139
1133
|
}
|
|
1140
1134
|
|
|
1141
1135
|
// src/components/pages/issues-page.tsx
|
|
1142
|
-
import * as
|
|
1143
|
-
import {
|
|
1136
|
+
import * as React18 from "react";
|
|
1137
|
+
import { useState as useState4 } from "react";
|
|
1138
|
+
import { Box as Box14, Link, Typography as Typography10 } from "@elementor/ui";
|
|
1144
1139
|
import { __ as __17 } from "@wordpress/i18n";
|
|
1145
1140
|
|
|
1146
1141
|
// src/utils/severity-counts.ts
|
|
1147
|
-
import { __ as __14
|
|
1142
|
+
import { __ as __14 } from "@wordpress/i18n";
|
|
1148
1143
|
var ALL_SEVERITIES = ["error", "warning", "info"];
|
|
1149
1144
|
function countSeverities(report, category) {
|
|
1150
1145
|
const counts = { error: 0, warning: 0, info: 0 };
|
|
@@ -1169,41 +1164,115 @@ function severityPluralLabel(severity) {
|
|
|
1169
1164
|
case "warning":
|
|
1170
1165
|
return __14("Warnings", "elementor");
|
|
1171
1166
|
case "info":
|
|
1172
|
-
return __14("
|
|
1167
|
+
return __14("Suggestions", "elementor");
|
|
1173
1168
|
}
|
|
1174
1169
|
}
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
case "info":
|
|
1190
|
-
return sprintf2(
|
|
1191
|
-
/* translators: %d: number of remaining info violations. */
|
|
1192
|
-
__14("%d info", "elementor"),
|
|
1193
|
-
count
|
|
1194
|
-
);
|
|
1170
|
+
|
|
1171
|
+
// src/components/audit-statuses-section.tsx
|
|
1172
|
+
import * as React15 from "react";
|
|
1173
|
+
import { Box as Box11, Divider, Typography as Typography8 } from "@elementor/ui";
|
|
1174
|
+
import { __ as __15, sprintf as sprintf2 } from "@wordpress/i18n";
|
|
1175
|
+
|
|
1176
|
+
// src/components/count-summary-circle.tsx
|
|
1177
|
+
import * as React14 from "react";
|
|
1178
|
+
import { Box as Box10, Chip as Chip2, Typography as Typography7 } from "@elementor/ui";
|
|
1179
|
+
var COUNT_SUMMARY_CIRCLE_SIZE = 64;
|
|
1180
|
+
var COUNT_SUMMARY_BORDER_WIDTH = 4;
|
|
1181
|
+
function chipBorderColor(theme, color) {
|
|
1182
|
+
if (color === "default" || !color) {
|
|
1183
|
+
return theme.palette.text.secondary;
|
|
1195
1184
|
}
|
|
1185
|
+
return theme.palette[color].main;
|
|
1186
|
+
}
|
|
1187
|
+
function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
|
|
1188
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1189
|
+
Box10,
|
|
1190
|
+
{
|
|
1191
|
+
"aria-label": ariaLabel,
|
|
1192
|
+
component: "button",
|
|
1193
|
+
onClick,
|
|
1194
|
+
type: "button",
|
|
1195
|
+
sx: {
|
|
1196
|
+
alignItems: "center",
|
|
1197
|
+
background: "none",
|
|
1198
|
+
border: "none",
|
|
1199
|
+
cursor: "pointer",
|
|
1200
|
+
display: "flex",
|
|
1201
|
+
flex: 1,
|
|
1202
|
+
flexDirection: "column",
|
|
1203
|
+
gap: 0.5,
|
|
1204
|
+
padding: 0
|
|
1205
|
+
}
|
|
1206
|
+
},
|
|
1207
|
+
/* @__PURE__ */ React14.createElement(
|
|
1208
|
+
Chip2,
|
|
1209
|
+
{
|
|
1210
|
+
color,
|
|
1211
|
+
label: count,
|
|
1212
|
+
size: "small",
|
|
1213
|
+
variant: "standard",
|
|
1214
|
+
sx: (theme) => ({
|
|
1215
|
+
border: `${COUNT_SUMMARY_BORDER_WIDTH}px solid ${chipBorderColor(theme, color)}`,
|
|
1216
|
+
borderRadius: "50%",
|
|
1217
|
+
height: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1218
|
+
maxWidth: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1219
|
+
width: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1220
|
+
"& .MuiChip-label": {
|
|
1221
|
+
fontSize: theme.typography.body2.fontSize,
|
|
1222
|
+
fontWeight: 700,
|
|
1223
|
+
lineHeight: 1,
|
|
1224
|
+
padding: 0
|
|
1225
|
+
}
|
|
1226
|
+
})
|
|
1227
|
+
}
|
|
1228
|
+
),
|
|
1229
|
+
/* @__PURE__ */ React14.createElement(Typography7, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
// src/components/audit-statuses-section.tsx
|
|
1234
|
+
var STATUS_ARIA_LABELS = {
|
|
1235
|
+
pass: (count) => sprintf2(
|
|
1236
|
+
/* translators: %d: number of passed audits. */
|
|
1237
|
+
__15("%d passed audits, view all", "elementor"),
|
|
1238
|
+
count
|
|
1239
|
+
),
|
|
1240
|
+
fail: (count) => sprintf2(
|
|
1241
|
+
/* translators: %d: number of failed audit violations. */
|
|
1242
|
+
__15("%d failed audits, view all", "elementor"),
|
|
1243
|
+
count
|
|
1244
|
+
),
|
|
1245
|
+
skipped: (count) => sprintf2(
|
|
1246
|
+
/* translators: %d: number of skipped audits. */
|
|
1247
|
+
__15("%d skipped audits, view all", "elementor"),
|
|
1248
|
+
count
|
|
1249
|
+
)
|
|
1250
|
+
};
|
|
1251
|
+
var STATUS_GROUPS = ["fail", "pass", "skipped"];
|
|
1252
|
+
function AuditStatusesSection({ report, onStatusClick }) {
|
|
1253
|
+
const statusCounts = auditStatusDisplayCounts(report);
|
|
1254
|
+
return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Typography8, { variant: "subtitle1", fontWeight: "bold" }, __15("Audit statuses", "elementor")), /* @__PURE__ */ React15.createElement(Box11, { sx: { display: "flex", justifyContent: "space-around", gap: 2 } }, STATUS_GROUPS.map((status) => /* @__PURE__ */ React15.createElement(
|
|
1255
|
+
CountSummaryCircle,
|
|
1256
|
+
{
|
|
1257
|
+
key: status,
|
|
1258
|
+
ariaLabel: STATUS_ARIA_LABELS[status](statusCounts[status]),
|
|
1259
|
+
color: auditStatusColor(status),
|
|
1260
|
+
count: statusCounts[status],
|
|
1261
|
+
label: auditStatusLabel(status),
|
|
1262
|
+
onClick: () => onStatusClick(status)
|
|
1263
|
+
}
|
|
1264
|
+
))), /* @__PURE__ */ React15.createElement(Divider, null));
|
|
1196
1265
|
}
|
|
1197
1266
|
|
|
1198
1267
|
// src/components/issues-category-row.tsx
|
|
1199
|
-
import * as
|
|
1268
|
+
import * as React16 from "react";
|
|
1200
1269
|
import { ChevronRightIcon } from "@elementor/icons";
|
|
1201
|
-
import { Box as
|
|
1270
|
+
import { Box as Box12, Rotate as Rotate2, Typography as Typography9, useTheme as useTheme2 } from "@elementor/ui";
|
|
1202
1271
|
function IssuesCategoryRow({ category, label, counts, onClick }) {
|
|
1203
1272
|
const isRtl = "rtl" === useTheme2().direction;
|
|
1204
1273
|
const Icon = CATEGORY_ICONS[category];
|
|
1205
|
-
return /* @__PURE__ */
|
|
1206
|
-
|
|
1274
|
+
return /* @__PURE__ */ React16.createElement(
|
|
1275
|
+
Box12,
|
|
1207
1276
|
{
|
|
1208
1277
|
role: "button",
|
|
1209
1278
|
tabIndex: 0,
|
|
@@ -1224,21 +1293,112 @@ function IssuesCategoryRow({ category, label, counts, onClick }) {
|
|
|
1224
1293
|
"&:focus-visible": { outline: "2px solid", outlineColor: "primary.main" }
|
|
1225
1294
|
}
|
|
1226
1295
|
},
|
|
1227
|
-
/* @__PURE__ */
|
|
1228
|
-
/* @__PURE__ */
|
|
1229
|
-
/* @__PURE__ */
|
|
1230
|
-
/* @__PURE__ */
|
|
1296
|
+
/* @__PURE__ */ React16.createElement(Icon, { fontSize: "small", color: "action" }),
|
|
1297
|
+
/* @__PURE__ */ React16.createElement(Typography9, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
|
|
1298
|
+
/* @__PURE__ */ React16.createElement(Box12, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React16.createElement(Box12, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React16.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React16.createElement(Typography9, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
|
|
1299
|
+
/* @__PURE__ */ React16.createElement(Rotate2, { in: isRtl }, /* @__PURE__ */ React16.createElement(ChevronRightIcon, { fontSize: "small", color: "action" }))
|
|
1231
1300
|
);
|
|
1232
1301
|
}
|
|
1233
1302
|
|
|
1234
|
-
// src/components/
|
|
1235
|
-
import * as
|
|
1236
|
-
import { Box as
|
|
1303
|
+
// src/components/severity-filter-chips.tsx
|
|
1304
|
+
import * as React17 from "react";
|
|
1305
|
+
import { Box as Box13, Chip as Chip3 } from "@elementor/ui";
|
|
1237
1306
|
import { __ as __16 } from "@wordpress/i18n";
|
|
1307
|
+
function SeverityFilterChips({ selected, onChange }) {
|
|
1308
|
+
return /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", alignItems: "center", gap: 1 } }, /* @__PURE__ */ React17.createElement(
|
|
1309
|
+
FilterChip,
|
|
1310
|
+
{
|
|
1311
|
+
label: __16("All", "elementor"),
|
|
1312
|
+
isSelected: selected === "all",
|
|
1313
|
+
onClick: () => onChange("all")
|
|
1314
|
+
}
|
|
1315
|
+
), ALL_SEVERITIES.map((severity) => /* @__PURE__ */ React17.createElement(
|
|
1316
|
+
FilterChip,
|
|
1317
|
+
{
|
|
1318
|
+
key: severity,
|
|
1319
|
+
label: severityPluralLabel(severity),
|
|
1320
|
+
icon: /* @__PURE__ */ React17.createElement(SeverityIcon, { severity }),
|
|
1321
|
+
isSelected: selected === severity,
|
|
1322
|
+
onClick: () => onChange(severity)
|
|
1323
|
+
}
|
|
1324
|
+
)));
|
|
1325
|
+
}
|
|
1326
|
+
function FilterChip({ label, icon, isSelected, onClick }) {
|
|
1327
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1328
|
+
Chip3,
|
|
1329
|
+
{
|
|
1330
|
+
label,
|
|
1331
|
+
icon,
|
|
1332
|
+
size: "small",
|
|
1333
|
+
variant: "filled",
|
|
1334
|
+
color: "default",
|
|
1335
|
+
onClick,
|
|
1336
|
+
"aria-pressed": isSelected,
|
|
1337
|
+
sx: { bgcolor: isSelected ? "action.selected" : "transparent" }
|
|
1338
|
+
}
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
// src/components/pages/issues-page.tsx
|
|
1343
|
+
function filterCounts(counts, filter) {
|
|
1344
|
+
if (filter === "all") {
|
|
1345
|
+
return counts;
|
|
1346
|
+
}
|
|
1347
|
+
return { error: 0, warning: 0, info: 0, [filter]: counts[filter] };
|
|
1348
|
+
}
|
|
1349
|
+
function IssuesPage({ report, onCategoryClick, onAllAuditsClick, onStatusClick }) {
|
|
1350
|
+
const [filter, setFilter] = useState4("all");
|
|
1351
|
+
const populatedCategories = getPopulatedCategories(report.categories, ALL_CATEGORIES);
|
|
1352
|
+
const categoryRows = populatedCategories.map((category) => ({ category, counts: filterCounts(countSeverities(report, category), filter) })).filter(({ counts }) => Object.values(counts).some((count) => count > 0));
|
|
1353
|
+
return /* @__PURE__ */ React18.createElement(Box14, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React18.createElement(AuditStatusesSection, { report, onStatusClick }), /* @__PURE__ */ React18.createElement(
|
|
1354
|
+
Link,
|
|
1355
|
+
{
|
|
1356
|
+
component: "button",
|
|
1357
|
+
underline: "none",
|
|
1358
|
+
color: "inherit",
|
|
1359
|
+
onClick: onAllAuditsClick,
|
|
1360
|
+
sx: { textAlign: "start" }
|
|
1361
|
+
},
|
|
1362
|
+
/* @__PURE__ */ React18.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
|
|
1363
|
+
), /* @__PURE__ */ React18.createElement(SeverityFilterChips, { selected: filter, onChange: setFilter }), /* @__PURE__ */ React18.createElement(Box14, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, categoryRows.map(({ category, counts }) => /* @__PURE__ */ React18.createElement(
|
|
1364
|
+
IssuesCategoryRow,
|
|
1365
|
+
{
|
|
1366
|
+
key: category,
|
|
1367
|
+
category,
|
|
1368
|
+
label: CATEGORY_LABELS[category],
|
|
1369
|
+
counts,
|
|
1370
|
+
onClick: () => onCategoryClick(category)
|
|
1371
|
+
}
|
|
1372
|
+
))));
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
// src/components/pages/overview-page.tsx
|
|
1376
|
+
import * as React23 from "react";
|
|
1377
|
+
import { Box as Box19, Chip as Chip4, Typography as Typography15 } from "@elementor/ui";
|
|
1378
|
+
import { __ as __21 } from "@wordpress/i18n";
|
|
1379
|
+
|
|
1380
|
+
// src/utils/score-thresholds.ts
|
|
1381
|
+
import { __ as __18 } from "@wordpress/i18n";
|
|
1382
|
+
var GOOD_THRESHOLD = 90;
|
|
1383
|
+
var OK_THRESHOLD = 50;
|
|
1384
|
+
function getScoreTier(score) {
|
|
1385
|
+
if (score >= GOOD_THRESHOLD) {
|
|
1386
|
+
return { color: "success", label: __18("Good", "elementor") };
|
|
1387
|
+
}
|
|
1388
|
+
if (score >= OK_THRESHOLD) {
|
|
1389
|
+
return { color: "warning", label: __18("Needs work", "elementor") };
|
|
1390
|
+
}
|
|
1391
|
+
return { color: "error", label: __18("At risk", "elementor") };
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
// src/components/promotions.tsx
|
|
1395
|
+
import * as React20 from "react";
|
|
1396
|
+
import { Box as Box16, Divider as Divider2, Typography as Typography12 } from "@elementor/ui";
|
|
1397
|
+
import { __ as __20 } from "@wordpress/i18n";
|
|
1238
1398
|
|
|
1239
1399
|
// src/register-promotions.ts
|
|
1240
|
-
import { ElementorCookieIcon, PhotoIcon, ShieldHalfFilledIcon
|
|
1241
|
-
import { __ as
|
|
1400
|
+
import { ElementorCookieIcon, PhotoIcon, ShieldHalfFilledIcon } from "@elementor/icons";
|
|
1401
|
+
import { __ as __19, _n, sprintf as sprintf3 } from "@wordpress/i18n";
|
|
1242
1402
|
function firstFailExternalUrl(run) {
|
|
1243
1403
|
return run.result.status === "fail" ? run.result.violations[0]?.externalUrl : void 0;
|
|
1244
1404
|
}
|
|
@@ -1246,7 +1406,7 @@ var PROMOTIONS = [
|
|
|
1246
1406
|
{
|
|
1247
1407
|
auditId: "audits/images-alt-text",
|
|
1248
1408
|
icon: PhotoIcon,
|
|
1249
|
-
ctaLabel:
|
|
1409
|
+
ctaLabel: __19("Fix with Ally", "elementor"),
|
|
1250
1410
|
formatSubtitle: (run) => {
|
|
1251
1411
|
if (run.result.status !== "fail") {
|
|
1252
1412
|
return null;
|
|
@@ -1266,21 +1426,21 @@ var PROMOTIONS = [
|
|
|
1266
1426
|
{
|
|
1267
1427
|
auditId: "audits/cookie-policy",
|
|
1268
1428
|
icon: ElementorCookieIcon,
|
|
1269
|
-
ctaLabel:
|
|
1270
|
-
formatSubtitle: (run) => run.result.status === "fail" ?
|
|
1429
|
+
ctaLabel: __19("Fix with Cookiez", "elementor"),
|
|
1430
|
+
formatSubtitle: (run) => run.result.status === "fail" ? __19("Generate cookie policy", "elementor") : null,
|
|
1271
1431
|
getCtaUrl: firstFailExternalUrl
|
|
1272
1432
|
},
|
|
1273
1433
|
{
|
|
1274
1434
|
auditId: "audits/scan-for-cookies",
|
|
1275
1435
|
icon: ElementorCookieIcon,
|
|
1276
|
-
ctaLabel:
|
|
1277
|
-
formatSubtitle: (run) => run.result.status === "fail" ?
|
|
1436
|
+
ctaLabel: __19("Scan", "elementor"),
|
|
1437
|
+
formatSubtitle: (run) => run.result.status === "fail" ? __19("Scan this page for cookies", "elementor") : null,
|
|
1278
1438
|
getCtaUrl: firstFailExternalUrl
|
|
1279
1439
|
},
|
|
1280
1440
|
{
|
|
1281
1441
|
auditId: "audits/images-too-large",
|
|
1282
|
-
icon:
|
|
1283
|
-
ctaLabel:
|
|
1442
|
+
icon: ShieldHalfFilledIcon,
|
|
1443
|
+
ctaLabel: __19("Optimize all", "elementor"),
|
|
1284
1444
|
formatSubtitle: (run) => {
|
|
1285
1445
|
if (run.result.status !== "fail") {
|
|
1286
1446
|
return null;
|
|
@@ -1305,11 +1465,11 @@ function findAuditRun(report, auditId) {
|
|
|
1305
1465
|
}
|
|
1306
1466
|
|
|
1307
1467
|
// src/components/promotion-card.tsx
|
|
1308
|
-
import * as
|
|
1309
|
-
import { Box as
|
|
1468
|
+
import * as React19 from "react";
|
|
1469
|
+
import { Box as Box15, Button as Button4, Typography as Typography11 } from "@elementor/ui";
|
|
1310
1470
|
function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle, title }) {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1312
|
-
|
|
1471
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1472
|
+
Box15,
|
|
1313
1473
|
{
|
|
1314
1474
|
sx: {
|
|
1315
1475
|
alignItems: "center",
|
|
@@ -1322,9 +1482,9 @@ function PromotionCard({ ctaDisabled, ctaLabel, icon: Icon, onCtaClick, subtitle
|
|
|
1322
1482
|
py: 1.5
|
|
1323
1483
|
}
|
|
1324
1484
|
},
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1327
|
-
/* @__PURE__ */
|
|
1485
|
+
/* @__PURE__ */ React19.createElement(Icon, { fontSize: "small", color: "action" }),
|
|
1486
|
+
/* @__PURE__ */ React19.createElement(Box15, { sx: { display: "flex", flex: 1, flexDirection: "column", gap: 0.25, minWidth: 0 } }, /* @__PURE__ */ React19.createElement(Typography11, { variant: "body2", fontWeight: "bold" }, title), /* @__PURE__ */ React19.createElement(Typography11, { variant: "caption", color: "text.secondary" }, subtitle)),
|
|
1487
|
+
/* @__PURE__ */ React19.createElement(Button4, { variant: "outlined", color: "secondary", size: "small", disabled: ctaDisabled, onClick: onCtaClick }, ctaLabel)
|
|
1328
1488
|
);
|
|
1329
1489
|
}
|
|
1330
1490
|
|
|
@@ -1353,7 +1513,7 @@ function Promotions({ report }) {
|
|
|
1353
1513
|
if (cards.length === 0) {
|
|
1354
1514
|
return null;
|
|
1355
1515
|
}
|
|
1356
|
-
return /* @__PURE__ */
|
|
1516
|
+
return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(Divider2, null), /* @__PURE__ */ React20.createElement(Typography12, { variant: "subtitle1", fontWeight: "bold" }, __20("Quick actions", "elementor")), /* @__PURE__ */ React20.createElement(Box16, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, cards.map(({ config, ctaUrl, key, run, subtitle }) => /* @__PURE__ */ React20.createElement(
|
|
1357
1517
|
PromotionCard,
|
|
1358
1518
|
{
|
|
1359
1519
|
key,
|
|
@@ -1371,115 +1531,14 @@ function Promotions({ report }) {
|
|
|
1371
1531
|
))));
|
|
1372
1532
|
}
|
|
1373
1533
|
|
|
1374
|
-
// src/components/pages/issues-page.tsx
|
|
1375
|
-
function IssuesPage({ report, onCategoryClick, onAllAuditsClick }) {
|
|
1376
|
-
const populatedCategories = getPopulatedCategories(report.categories, ALL_CATEGORIES);
|
|
1377
|
-
return /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React17.createElement(
|
|
1378
|
-
Link,
|
|
1379
|
-
{
|
|
1380
|
-
component: "button",
|
|
1381
|
-
underline: "none",
|
|
1382
|
-
color: "inherit",
|
|
1383
|
-
onClick: onAllAuditsClick,
|
|
1384
|
-
sx: { textAlign: "start" }
|
|
1385
|
-
},
|
|
1386
|
-
/* @__PURE__ */ React17.createElement(Typography10, { variant: "subtitle1", component: "h2" }, __17("All issues", "elementor"))
|
|
1387
|
-
), /* @__PURE__ */ React17.createElement(Box13, { sx: { display: "flex", flexDirection: "column", gap: 1 } }, populatedCategories.map((category) => /* @__PURE__ */ React17.createElement(
|
|
1388
|
-
IssuesCategoryRow,
|
|
1389
|
-
{
|
|
1390
|
-
key: category,
|
|
1391
|
-
category,
|
|
1392
|
-
label: CATEGORY_LABELS[category],
|
|
1393
|
-
counts: countSeverities(report, category),
|
|
1394
|
-
onClick: () => onCategoryClick(category)
|
|
1395
|
-
}
|
|
1396
|
-
))), /* @__PURE__ */ React17.createElement(Promotions, { report }));
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
// src/components/pages/overview-page.tsx
|
|
1400
|
-
import * as React21 from "react";
|
|
1401
|
-
import { Box as Box17, Chip as Chip3, Divider, Typography as Typography14 } from "@elementor/ui";
|
|
1402
|
-
import { __ as __19, sprintf as sprintf4 } from "@wordpress/i18n";
|
|
1403
|
-
|
|
1404
|
-
// src/utils/score-thresholds.ts
|
|
1405
|
-
import { __ as __18 } from "@wordpress/i18n";
|
|
1406
|
-
var GOOD_THRESHOLD = 90;
|
|
1407
|
-
var OK_THRESHOLD = 50;
|
|
1408
|
-
function getScoreTier(score) {
|
|
1409
|
-
if (score >= GOOD_THRESHOLD) {
|
|
1410
|
-
return { color: "success", label: __18("Good", "elementor") };
|
|
1411
|
-
}
|
|
1412
|
-
if (score >= OK_THRESHOLD) {
|
|
1413
|
-
return { color: "warning", label: __18("Needs work", "elementor") };
|
|
1414
|
-
}
|
|
1415
|
-
return { color: "error", label: __18("At risk", "elementor") };
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
// src/components/count-summary-circle.tsx
|
|
1419
|
-
import * as React18 from "react";
|
|
1420
|
-
import { Box as Box14, Chip as Chip2, Typography as Typography11 } from "@elementor/ui";
|
|
1421
|
-
var COUNT_SUMMARY_CIRCLE_SIZE = 64;
|
|
1422
|
-
var COUNT_SUMMARY_BORDER_WIDTH = 4;
|
|
1423
|
-
function chipBorderColor(theme, color) {
|
|
1424
|
-
if (color === "default" || !color) {
|
|
1425
|
-
return theme.palette.text.secondary;
|
|
1426
|
-
}
|
|
1427
|
-
return theme.palette[color].main;
|
|
1428
|
-
}
|
|
1429
|
-
function CountSummaryCircle({ ariaLabel, color, count, label, onClick }) {
|
|
1430
|
-
return /* @__PURE__ */ React18.createElement(
|
|
1431
|
-
Box14,
|
|
1432
|
-
{
|
|
1433
|
-
"aria-label": ariaLabel,
|
|
1434
|
-
component: "button",
|
|
1435
|
-
onClick,
|
|
1436
|
-
type: "button",
|
|
1437
|
-
sx: {
|
|
1438
|
-
alignItems: "center",
|
|
1439
|
-
background: "none",
|
|
1440
|
-
border: "none",
|
|
1441
|
-
cursor: "pointer",
|
|
1442
|
-
display: "flex",
|
|
1443
|
-
flex: 1,
|
|
1444
|
-
flexDirection: "column",
|
|
1445
|
-
gap: 0.5,
|
|
1446
|
-
padding: 0
|
|
1447
|
-
}
|
|
1448
|
-
},
|
|
1449
|
-
/* @__PURE__ */ React18.createElement(
|
|
1450
|
-
Chip2,
|
|
1451
|
-
{
|
|
1452
|
-
color,
|
|
1453
|
-
label: count,
|
|
1454
|
-
size: "small",
|
|
1455
|
-
variant: "standard",
|
|
1456
|
-
sx: (theme) => ({
|
|
1457
|
-
border: `${COUNT_SUMMARY_BORDER_WIDTH}px solid ${chipBorderColor(theme, color)}`,
|
|
1458
|
-
borderRadius: "50%",
|
|
1459
|
-
height: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1460
|
-
maxWidth: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1461
|
-
width: COUNT_SUMMARY_CIRCLE_SIZE,
|
|
1462
|
-
"& .MuiChip-label": {
|
|
1463
|
-
fontSize: theme.typography.body2.fontSize,
|
|
1464
|
-
fontWeight: 700,
|
|
1465
|
-
lineHeight: 1,
|
|
1466
|
-
padding: 0
|
|
1467
|
-
}
|
|
1468
|
-
})
|
|
1469
|
-
}
|
|
1470
|
-
),
|
|
1471
|
-
/* @__PURE__ */ React18.createElement(Typography11, { color: "text.secondary", sx: { textAlign: "center" }, variant: "caption" }, label)
|
|
1472
|
-
);
|
|
1473
|
-
}
|
|
1474
|
-
|
|
1475
1534
|
// src/components/score-bar.tsx
|
|
1476
|
-
import * as
|
|
1535
|
+
import * as React21 from "react";
|
|
1477
1536
|
import { ChevronRightIcon as ChevronRightIcon2 } from "@elementor/icons";
|
|
1478
|
-
import { Box as
|
|
1537
|
+
import { Box as Box17, LinearProgress, Rotate as Rotate3, Typography as Typography13, useTheme as useTheme3 } from "@elementor/ui";
|
|
1479
1538
|
function ScoreBar({ label, score, onClick }) {
|
|
1480
1539
|
const isRtl = "rtl" === useTheme3().direction;
|
|
1481
|
-
return /* @__PURE__ */
|
|
1482
|
-
|
|
1540
|
+
return /* @__PURE__ */ React21.createElement(
|
|
1541
|
+
Box17,
|
|
1483
1542
|
{
|
|
1484
1543
|
role: onClick ? "button" : void 0,
|
|
1485
1544
|
tabIndex: onClick ? 0 : void 0,
|
|
@@ -1495,8 +1554,8 @@ function ScoreBar({ label, score, onClick }) {
|
|
|
1495
1554
|
py: 0.5
|
|
1496
1555
|
}
|
|
1497
1556
|
},
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1557
|
+
/* @__PURE__ */ React21.createElement(Typography13, { variant: "body2", sx: { minWidth: 96 } }, label),
|
|
1558
|
+
/* @__PURE__ */ React21.createElement(
|
|
1500
1559
|
LinearProgress,
|
|
1501
1560
|
{
|
|
1502
1561
|
variant: "determinate",
|
|
@@ -1505,8 +1564,8 @@ function ScoreBar({ label, score, onClick }) {
|
|
|
1505
1564
|
sx: { flex: 1, height: 6, borderRadius: 4, bgcolor: "action.disabledBackground" }
|
|
1506
1565
|
}
|
|
1507
1566
|
),
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
|
|
1567
|
+
/* @__PURE__ */ React21.createElement(
|
|
1568
|
+
Typography13,
|
|
1510
1569
|
{
|
|
1511
1570
|
variant: "body2",
|
|
1512
1571
|
color: "text.primary",
|
|
@@ -1514,19 +1573,19 @@ function ScoreBar({ label, score, onClick }) {
|
|
|
1514
1573
|
},
|
|
1515
1574
|
score
|
|
1516
1575
|
),
|
|
1517
|
-
onClick && /* @__PURE__ */
|
|
1576
|
+
onClick && /* @__PURE__ */ React21.createElement(Rotate3, { in: isRtl }, /* @__PURE__ */ React21.createElement(ChevronRightIcon2, { fontSize: "small", color: "action" }))
|
|
1518
1577
|
);
|
|
1519
1578
|
}
|
|
1520
1579
|
|
|
1521
1580
|
// src/components/score-circle.tsx
|
|
1522
|
-
import * as
|
|
1523
|
-
import { Box as
|
|
1581
|
+
import * as React22 from "react";
|
|
1582
|
+
import { Box as Box18, CircularProgress as CircularProgress2, Typography as Typography14 } from "@elementor/ui";
|
|
1524
1583
|
var SCORE_CIRCLE_SIZE = 88;
|
|
1525
1584
|
var SCORE_CIRCLE_THICKNESS = 3;
|
|
1526
1585
|
function ScoreCircle({ color, score }) {
|
|
1527
1586
|
const progressColor = color ?? getScoreTier(score).color;
|
|
1528
|
-
return /* @__PURE__ */
|
|
1529
|
-
|
|
1587
|
+
return /* @__PURE__ */ React22.createElement(
|
|
1588
|
+
Box18,
|
|
1530
1589
|
{
|
|
1531
1590
|
role: "progressbar",
|
|
1532
1591
|
"aria-valuenow": score,
|
|
@@ -1534,7 +1593,7 @@ function ScoreCircle({ color, score }) {
|
|
|
1534
1593
|
"aria-valuemax": 100,
|
|
1535
1594
|
sx: { position: "relative", display: "inline-flex" }
|
|
1536
1595
|
},
|
|
1537
|
-
/* @__PURE__ */
|
|
1596
|
+
/* @__PURE__ */ React22.createElement(
|
|
1538
1597
|
CircularProgress2,
|
|
1539
1598
|
{
|
|
1540
1599
|
variant: "determinate",
|
|
@@ -1544,7 +1603,7 @@ function ScoreCircle({ color, score }) {
|
|
|
1544
1603
|
sx: { color: "action.disabledBackground" }
|
|
1545
1604
|
}
|
|
1546
1605
|
),
|
|
1547
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ React22.createElement(
|
|
1548
1607
|
CircularProgress2,
|
|
1549
1608
|
{
|
|
1550
1609
|
variant: "determinate",
|
|
@@ -1555,8 +1614,8 @@ function ScoreCircle({ color, score }) {
|
|
|
1555
1614
|
sx: { position: "absolute", left: 0 }
|
|
1556
1615
|
}
|
|
1557
1616
|
),
|
|
1558
|
-
/* @__PURE__ */
|
|
1559
|
-
|
|
1617
|
+
/* @__PURE__ */ React22.createElement(
|
|
1618
|
+
Box18,
|
|
1560
1619
|
{
|
|
1561
1620
|
sx: {
|
|
1562
1621
|
position: "absolute",
|
|
@@ -1566,8 +1625,8 @@ function ScoreCircle({ color, score }) {
|
|
|
1566
1625
|
justifyContent: "center"
|
|
1567
1626
|
}
|
|
1568
1627
|
},
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
|
|
1628
|
+
/* @__PURE__ */ React22.createElement(
|
|
1629
|
+
Typography14,
|
|
1571
1630
|
{
|
|
1572
1631
|
variant: "h4",
|
|
1573
1632
|
component: "span",
|
|
@@ -1581,31 +1640,11 @@ function ScoreCircle({ color, score }) {
|
|
|
1581
1640
|
}
|
|
1582
1641
|
|
|
1583
1642
|
// src/components/pages/overview-page.tsx
|
|
1584
|
-
|
|
1585
|
-
pass: (count) => sprintf4(
|
|
1586
|
-
/* translators: %d: number of passed audits. */
|
|
1587
|
-
__19("%d passed audits, view all", "elementor"),
|
|
1588
|
-
count
|
|
1589
|
-
),
|
|
1590
|
-
fail: (count) => sprintf4(
|
|
1591
|
-
/* translators: %d: number of failed audit violations. */
|
|
1592
|
-
__19("%d failed audits, view all", "elementor"),
|
|
1593
|
-
count
|
|
1594
|
-
),
|
|
1595
|
-
skipped: (count) => sprintf4(
|
|
1596
|
-
/* translators: %d: number of skipped audits. */
|
|
1597
|
-
__19("%d skipped audits, view all", "elementor"),
|
|
1598
|
-
count
|
|
1599
|
-
)
|
|
1600
|
-
};
|
|
1601
|
-
var STATUS_GROUPS = ["fail", "pass", "skipped"];
|
|
1602
|
-
function OverviewPage({ onCategoryClick, onStatusClick, report }) {
|
|
1643
|
+
function OverviewPage({ onCategoryClick, report }) {
|
|
1603
1644
|
const populatedCategories = getPopulatedCategories(report.categories, ALL_CATEGORIES);
|
|
1604
|
-
const severityCounts = countSeverities(report);
|
|
1605
|
-
const statusCounts = auditStatusDisplayCounts(report);
|
|
1606
1645
|
const overallScore = getScoreTier(report.overall);
|
|
1607
|
-
return /* @__PURE__ */
|
|
1608
|
-
|
|
1646
|
+
return /* @__PURE__ */ React23.createElement(Box19, { sx: { display: "flex", flexDirection: "column", gap: 4, p: 2 } }, /* @__PURE__ */ React23.createElement(Box19, { sx: { display: "flex", alignItems: "center", gap: 2 } }, /* @__PURE__ */ React23.createElement(ScoreCircle, { color: overallScore.color, score: report.overall }), /* @__PURE__ */ React23.createElement(Box19, { sx: { display: "flex", flexDirection: "column", gap: 0.5 } }, /* @__PURE__ */ React23.createElement(
|
|
1647
|
+
Chip4,
|
|
1609
1648
|
{
|
|
1610
1649
|
label: overallScore.label,
|
|
1611
1650
|
color: overallScore.color,
|
|
@@ -1613,7 +1652,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
|
|
|
1613
1652
|
size: "small",
|
|
1614
1653
|
sx: { fontWeight: 600, alignSelf: "flex-start" }
|
|
1615
1654
|
}
|
|
1616
|
-
), /* @__PURE__ */
|
|
1655
|
+
), /* @__PURE__ */ React23.createElement(Typography15, { variant: "body2", color: "text.secondary" }, __21("Overall score", "elementor")))), /* @__PURE__ */ React23.createElement(Box19, { sx: { display: "flex", flexDirection: "column", gap: 2 } }, populatedCategories.map((category) => /* @__PURE__ */ React23.createElement(
|
|
1617
1656
|
ScoreBar,
|
|
1618
1657
|
{
|
|
1619
1658
|
key: category,
|
|
@@ -1621,45 +1660,7 @@ function OverviewPage({ onCategoryClick, onStatusClick, report }) {
|
|
|
1621
1660
|
score: report.categories[category].score,
|
|
1622
1661
|
onClick: () => onCategoryClick(category)
|
|
1623
1662
|
}
|
|
1624
|
-
))), /* @__PURE__ */
|
|
1625
|
-
CountSummaryCircle,
|
|
1626
|
-
{
|
|
1627
|
-
key: status,
|
|
1628
|
-
ariaLabel: STATUS_ARIA_LABELS[status](statusCounts[status]),
|
|
1629
|
-
color: auditStatusColor(status),
|
|
1630
|
-
count: statusCounts[status],
|
|
1631
|
-
label: auditStatusLabel(status),
|
|
1632
|
-
onClick: () => onStatusClick(status)
|
|
1633
|
-
}
|
|
1634
|
-
))), /* @__PURE__ */ React21.createElement(Divider, null), /* @__PURE__ */ React21.createElement(Typography14, { variant: "subtitle1", fontWeight: "bold" }, __19("Remaining issues", "elementor")), /* @__PURE__ */ React21.createElement(
|
|
1635
|
-
Box17,
|
|
1636
|
-
{
|
|
1637
|
-
component: "ul",
|
|
1638
|
-
sx: {
|
|
1639
|
-
display: "flex",
|
|
1640
|
-
flexDirection: "column",
|
|
1641
|
-
gap: 1,
|
|
1642
|
-
listStyle: "none",
|
|
1643
|
-
m: 0,
|
|
1644
|
-
p: 0
|
|
1645
|
-
}
|
|
1646
|
-
},
|
|
1647
|
-
ALL_SEVERITIES.map((severity) => {
|
|
1648
|
-
const count = severityCounts[severity];
|
|
1649
|
-
return /* @__PURE__ */ React21.createElement(
|
|
1650
|
-
Box17,
|
|
1651
|
-
{
|
|
1652
|
-
"aria-label": severityRemainingCountLabel(severity, count),
|
|
1653
|
-
component: "li",
|
|
1654
|
-
key: severity,
|
|
1655
|
-
sx: { alignItems: "center", display: "flex", gap: 0.5 }
|
|
1656
|
-
},
|
|
1657
|
-
/* @__PURE__ */ React21.createElement(SeverityIcon, { severity }),
|
|
1658
|
-
/* @__PURE__ */ React21.createElement(Typography14, { variant: "body2", fontWeight: "bold" }, count),
|
|
1659
|
-
/* @__PURE__ */ React21.createElement(Typography14, { variant: "body2" }, severityPluralLabel(severity))
|
|
1660
|
-
);
|
|
1661
|
-
})
|
|
1662
|
-
));
|
|
1663
|
+
))), /* @__PURE__ */ React23.createElement(Promotions, { report }));
|
|
1663
1664
|
}
|
|
1664
1665
|
|
|
1665
1666
|
// src/components/report-shell.tsx
|
|
@@ -1679,7 +1680,7 @@ function isCategoryPage(page) {
|
|
|
1679
1680
|
return typeof page === "object" && "category" in page;
|
|
1680
1681
|
}
|
|
1681
1682
|
function ReportShell({ report }) {
|
|
1682
|
-
const [activePage, setActivePage] =
|
|
1683
|
+
const [activePage, setActivePage] = useState5("overview");
|
|
1683
1684
|
const currentTab = activeTab(activePage);
|
|
1684
1685
|
const handleTabChange = (_, value) => {
|
|
1685
1686
|
setActivePage(value);
|
|
@@ -1695,10 +1696,10 @@ function ReportShell({ report }) {
|
|
|
1695
1696
|
setActivePage(activePage.backTo);
|
|
1696
1697
|
}
|
|
1697
1698
|
};
|
|
1698
|
-
return /* @__PURE__ */
|
|
1699
|
+
return /* @__PURE__ */ React24.createElement(Box20, { sx: { display: "flex", flexDirection: "column", flex: 1, minHeight: 0 } }, /* @__PURE__ */ React24.createElement(Box20, { sx: { flexShrink: 0 } }, /* @__PURE__ */ React24.createElement(
|
|
1699
1700
|
Tabs,
|
|
1700
1701
|
{
|
|
1701
|
-
"aria-label":
|
|
1702
|
+
"aria-label": __22("Audit navigation", "elementor"),
|
|
1702
1703
|
value: currentTab,
|
|
1703
1704
|
onChange: handleTabChange,
|
|
1704
1705
|
textColor: "secondary",
|
|
@@ -1707,30 +1708,30 @@ function ReportShell({ report }) {
|
|
|
1707
1708
|
centered: true,
|
|
1708
1709
|
variant: "fullWidth"
|
|
1709
1710
|
},
|
|
1710
|
-
/* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
), /* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ React24.createElement(Tab, { value: "overview", label: __22("Overview", "elementor") }),
|
|
1712
|
+
/* @__PURE__ */ React24.createElement(Tab, { value: "issues", label: __22("Issues", "elementor") })
|
|
1713
|
+
), /* @__PURE__ */ React24.createElement(Divider3, null)), /* @__PURE__ */ React24.createElement(Box20, { sx: { flex: 1, minHeight: 0, overflowY: "auto" } }, activePage === "overview" && /* @__PURE__ */ React24.createElement(
|
|
1713
1714
|
OverviewPage,
|
|
1714
1715
|
{
|
|
1715
1716
|
report,
|
|
1716
|
-
onCategoryClick: (category) => openCategory(category, "overview")
|
|
1717
|
-
onStatusClick: (status) => openAllAudits(status, "overview")
|
|
1717
|
+
onCategoryClick: (category) => openCategory(category, "overview")
|
|
1718
1718
|
}
|
|
1719
|
-
), activePage === "issues" && /* @__PURE__ */
|
|
1719
|
+
), activePage === "issues" && /* @__PURE__ */ React24.createElement(
|
|
1720
1720
|
IssuesPage,
|
|
1721
1721
|
{
|
|
1722
1722
|
report,
|
|
1723
1723
|
onCategoryClick: (category) => openCategory(category, "issues"),
|
|
1724
|
-
onAllAuditsClick: () => openAllAudits()
|
|
1724
|
+
onAllAuditsClick: () => openAllAudits(),
|
|
1725
|
+
onStatusClick: (status) => openAllAudits(status)
|
|
1725
1726
|
}
|
|
1726
|
-
), isAllAuditsPage(activePage) && /* @__PURE__ */
|
|
1727
|
+
), isAllAuditsPage(activePage) && /* @__PURE__ */ React24.createElement(
|
|
1727
1728
|
AllAuditsPage,
|
|
1728
1729
|
{
|
|
1729
1730
|
report,
|
|
1730
1731
|
initialExpandedStatus: activePage.expand,
|
|
1731
1732
|
onBack: backFromSubPage
|
|
1732
1733
|
}
|
|
1733
|
-
), isCategoryPage(activePage) && /* @__PURE__ */
|
|
1734
|
+
), isCategoryPage(activePage) && /* @__PURE__ */ React24.createElement(CategoryPage, { category: activePage.category, report, onBack: backFromSubPage })));
|
|
1734
1735
|
}
|
|
1735
1736
|
|
|
1736
1737
|
// src/components/audit-panel.tsx
|
|
@@ -1739,15 +1740,24 @@ function AuditPanel() {
|
|
|
1739
1740
|
const currentDocumentId = getCurrentDocumentId2() ?? 0;
|
|
1740
1741
|
const onRun = () => run(currentDocumentId);
|
|
1741
1742
|
const lastScanLabel = report ? new Date(report.runAt).toLocaleTimeString() : null;
|
|
1742
|
-
return /* @__PURE__ */
|
|
1743
|
+
return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
|
|
1743
1744
|
FloatingPanelHeader,
|
|
1744
1745
|
{
|
|
1745
1746
|
panelId: "audit-panel",
|
|
1746
|
-
title:
|
|
1747
|
-
badge:
|
|
1747
|
+
title: __23("Page Audit", "elementor"),
|
|
1748
|
+
badge: __23("Beta", "elementor"),
|
|
1748
1749
|
titleVariant: "subtitle2"
|
|
1749
1750
|
}
|
|
1750
|
-
), /* @__PURE__ */
|
|
1751
|
+
), /* @__PURE__ */ React25.createElement(
|
|
1752
|
+
FloatingPanelBody,
|
|
1753
|
+
{
|
|
1754
|
+
sx: status === "ready" ? { display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 } : void 0
|
|
1755
|
+
},
|
|
1756
|
+
status === "idle" && /* @__PURE__ */ React25.createElement(WelcomePage, null),
|
|
1757
|
+
status === "loading" && /* @__PURE__ */ React25.createElement(LoadingPage, null),
|
|
1758
|
+
status === "error" && /* @__PURE__ */ React25.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }),
|
|
1759
|
+
status === "ready" && report && /* @__PURE__ */ React25.createElement(ReportShell, { report })
|
|
1760
|
+
), /* @__PURE__ */ React25.createElement(FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React25.createElement(Typography16, { variant: "caption", sx: { flex: 1 } }, __23("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React25.createElement(Box21, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React25.createElement(AuditFeedback, null), /* @__PURE__ */ React25.createElement(
|
|
1751
1761
|
Button5,
|
|
1752
1762
|
{
|
|
1753
1763
|
variant: "contained",
|
|
@@ -1755,7 +1765,7 @@ function AuditPanel() {
|
|
|
1755
1765
|
onClick: onRun,
|
|
1756
1766
|
disabled: status === "loading" || currentDocumentId === 0
|
|
1757
1767
|
},
|
|
1758
|
-
lastScanLabel ?
|
|
1768
|
+
lastScanLabel ? __23("Re-scan", "elementor") : __23("Run page audit", "elementor")
|
|
1759
1769
|
)));
|
|
1760
1770
|
}
|
|
1761
1771
|
|
|
@@ -1780,8 +1790,8 @@ function useAuditToggleProps() {
|
|
|
1780
1790
|
const { isOpen } = auditPanel.useFloatingPanelStatus();
|
|
1781
1791
|
const { toggle } = auditPanel.useFloatingPanelActions();
|
|
1782
1792
|
return {
|
|
1783
|
-
title:
|
|
1784
|
-
icon:
|
|
1793
|
+
title: __24("Audit Page", "elementor"),
|
|
1794
|
+
icon: ShieldCheckIcon3,
|
|
1785
1795
|
selected: isOpen,
|
|
1786
1796
|
onClick: () => toggle()
|
|
1787
1797
|
};
|
|
@@ -1798,15 +1808,15 @@ function registerAppBarAuditsToggle() {
|
|
|
1798
1808
|
}
|
|
1799
1809
|
|
|
1800
1810
|
// src/audits/accessibility-policy.ts
|
|
1801
|
-
import { __ as
|
|
1811
|
+
import { __ as __25 } from "@wordpress/i18n";
|
|
1802
1812
|
var audit = {
|
|
1803
1813
|
id: "audits/accessibility-policy",
|
|
1804
|
-
title:
|
|
1805
|
-
description:
|
|
1814
|
+
title: __25("Accessibility policy", "elementor"),
|
|
1815
|
+
description: __25(
|
|
1806
1816
|
"An accessibility policy demonstrates your commitment to digital inclusion and may be legally required in some regions.",
|
|
1807
1817
|
"elementor"
|
|
1808
1818
|
),
|
|
1809
|
-
fixHint:
|
|
1819
|
+
fixHint: __25("Install the Ally plugin to add an accessibility policy to your website.", "elementor"),
|
|
1810
1820
|
categories: ["compliance"],
|
|
1811
1821
|
severity: "info",
|
|
1812
1822
|
weight: 1,
|
|
@@ -1819,7 +1829,7 @@ var audit = {
|
|
|
1819
1829
|
violations: [
|
|
1820
1830
|
{
|
|
1821
1831
|
auditId: audit.id,
|
|
1822
|
-
label:
|
|
1832
|
+
label: __25("Ally plugin is not installed or active.", "elementor"),
|
|
1823
1833
|
externalUrl: ctx.pageContext.ally_plugin_url
|
|
1824
1834
|
}
|
|
1825
1835
|
]
|
|
@@ -1828,15 +1838,15 @@ var audit = {
|
|
|
1828
1838
|
};
|
|
1829
1839
|
|
|
1830
1840
|
// src/audits/cookie-policy.ts
|
|
1831
|
-
import { __ as
|
|
1841
|
+
import { __ as __26 } from "@wordpress/i18n";
|
|
1832
1842
|
var audit2 = {
|
|
1833
1843
|
id: "audits/cookie-policy",
|
|
1834
|
-
title:
|
|
1835
|
-
description:
|
|
1844
|
+
title: __26("Cookie policy", "elementor"),
|
|
1845
|
+
description: __26(
|
|
1836
1846
|
"A cookie policy is required by privacy regulations such as GDPR (EU) or CCPA (US) to inform visitors about tracking and data collection.",
|
|
1837
1847
|
"elementor"
|
|
1838
1848
|
),
|
|
1839
|
-
fixHint:
|
|
1849
|
+
fixHint: __26("Install the Cookiez plugin to add a cookie policy to your website.", "elementor"),
|
|
1840
1850
|
categories: ["compliance"],
|
|
1841
1851
|
severity: "info",
|
|
1842
1852
|
weight: 1,
|
|
@@ -1849,7 +1859,7 @@ var audit2 = {
|
|
|
1849
1859
|
violations: [
|
|
1850
1860
|
{
|
|
1851
1861
|
auditId: audit2.id,
|
|
1852
|
-
label:
|
|
1862
|
+
label: __26("Cookiez plugin is not installed or active.", "elementor"),
|
|
1853
1863
|
externalUrl: ctx.pageContext.cookiez_plugin_url
|
|
1854
1864
|
}
|
|
1855
1865
|
]
|
|
@@ -1859,7 +1869,7 @@ var audit2 = {
|
|
|
1859
1869
|
|
|
1860
1870
|
// src/audits/deep-nesting.ts
|
|
1861
1871
|
import { getWidgetsCache } from "@elementor/editor-elements";
|
|
1862
|
-
import { __ as
|
|
1872
|
+
import { __ as __27 } from "@wordpress/i18n";
|
|
1863
1873
|
var MAX_NESTING_DEPTH = 6;
|
|
1864
1874
|
function isNestingElement(node, widgetsCache) {
|
|
1865
1875
|
if (node.elType === "container") {
|
|
@@ -1869,18 +1879,18 @@ function isNestingElement(node, widgetsCache) {
|
|
|
1869
1879
|
}
|
|
1870
1880
|
var audit3 = {
|
|
1871
1881
|
id: "audits/deep-nesting",
|
|
1872
|
-
title:
|
|
1873
|
-
description:
|
|
1882
|
+
title: __27("Deep container nesting", "elementor"),
|
|
1883
|
+
description: __27(
|
|
1874
1884
|
"Container nesting exceeds the recommended depth. Deep DOM trees hurt rendering performance and readability.",
|
|
1875
1885
|
"elementor"
|
|
1876
1886
|
),
|
|
1877
|
-
fixHint:
|
|
1887
|
+
fixHint: __27("Flatten the layout by removing unnecessary wrapper containers.", "elementor"),
|
|
1878
1888
|
categories: ["performance", "best-practices"],
|
|
1879
1889
|
severity: "warning",
|
|
1880
1890
|
weight: 5,
|
|
1881
1891
|
evaluate: (ctx) => {
|
|
1882
1892
|
if (ctx.elements.tree.length === 0) {
|
|
1883
|
-
return { status: "skipped", reason:
|
|
1893
|
+
return { status: "skipped", reason: __27("No elements", "elementor") };
|
|
1884
1894
|
}
|
|
1885
1895
|
const widgetsCache = getWidgetsCache();
|
|
1886
1896
|
const violations = [];
|
|
@@ -1894,7 +1904,7 @@ var audit3 = {
|
|
|
1894
1904
|
auditId: audit3.id,
|
|
1895
1905
|
elementId: node.id,
|
|
1896
1906
|
targetHint: "element-settings",
|
|
1897
|
-
label:
|
|
1907
|
+
label: __27("Container nesting is too deep.", "elementor")
|
|
1898
1908
|
});
|
|
1899
1909
|
}
|
|
1900
1910
|
});
|
|
@@ -1903,15 +1913,15 @@ var audit3 = {
|
|
|
1903
1913
|
};
|
|
1904
1914
|
|
|
1905
1915
|
// src/audits/default-design-system.ts
|
|
1906
|
-
import { __ as
|
|
1916
|
+
import { __ as __28 } from "@wordpress/i18n";
|
|
1907
1917
|
var audit4 = {
|
|
1908
1918
|
id: "audits/default-design-system",
|
|
1909
|
-
title:
|
|
1910
|
-
description:
|
|
1919
|
+
title: __28("Default website kit", "elementor"),
|
|
1920
|
+
description: __28(
|
|
1911
1921
|
"Your website is using the default design system colors and fonts. Custom branding makes the website feel uniquely yours.",
|
|
1912
1922
|
"elementor"
|
|
1913
1923
|
),
|
|
1914
|
-
fixHint:
|
|
1924
|
+
fixHint: __28("Open Site Settings and customize your kit (colors, fonts, layout).", "elementor"),
|
|
1915
1925
|
categories: ["best-practices"],
|
|
1916
1926
|
severity: "info",
|
|
1917
1927
|
weight: 1,
|
|
@@ -1924,7 +1934,7 @@ var audit4 = {
|
|
|
1924
1934
|
violations: [
|
|
1925
1935
|
{
|
|
1926
1936
|
auditId: audit4.id,
|
|
1927
|
-
label:
|
|
1937
|
+
label: __28("Kit appears unchanged from default.", "elementor"),
|
|
1928
1938
|
targetHint: "site-settings"
|
|
1929
1939
|
}
|
|
1930
1940
|
]
|
|
@@ -1934,16 +1944,16 @@ var audit4 = {
|
|
|
1934
1944
|
|
|
1935
1945
|
// src/audits/deprecated-widgets.ts
|
|
1936
1946
|
import { getWidgetsCache as getWidgetsCache2 } from "@elementor/editor-elements";
|
|
1937
|
-
import { __ as
|
|
1947
|
+
import { __ as __29 } from "@wordpress/i18n";
|
|
1938
1948
|
var DEPRECATION_CONTROL_NAME = "deprecation_message";
|
|
1939
1949
|
var audit5 = {
|
|
1940
1950
|
id: "audits/deprecated-widgets",
|
|
1941
|
-
title:
|
|
1942
|
-
description:
|
|
1951
|
+
title: __29("Deprecated widgets", "elementor"),
|
|
1952
|
+
description: __29(
|
|
1943
1953
|
"Deprecated widgets should not be used. For better capabilities use the recommended replacement.",
|
|
1944
1954
|
"elementor"
|
|
1945
1955
|
),
|
|
1946
|
-
fixHint:
|
|
1956
|
+
fixHint: __29("Replace each deprecated widget with the recommended new widget shown in its panel.", "elementor"),
|
|
1947
1957
|
categories: ["best-practices", "performance"],
|
|
1948
1958
|
severity: "warning",
|
|
1949
1959
|
weight: 7,
|
|
@@ -1970,7 +1980,7 @@ var audit5 = {
|
|
|
1970
1980
|
auditId: audit5.id,
|
|
1971
1981
|
elementId: node.id,
|
|
1972
1982
|
targetHint: "element-settings",
|
|
1973
|
-
label:
|
|
1983
|
+
label: __29("Using deprecated widget.", "elementor")
|
|
1974
1984
|
});
|
|
1975
1985
|
});
|
|
1976
1986
|
return violations.length === 0 ? { status: "pass" } : { status: "fail", violations };
|
|
@@ -1978,7 +1988,7 @@ var audit5 = {
|
|
|
1978
1988
|
};
|
|
1979
1989
|
|
|
1980
1990
|
// src/audits/google-consent-mode.ts
|
|
1981
|
-
import { __ as
|
|
1991
|
+
import { __ as __30 } from "@wordpress/i18n";
|
|
1982
1992
|
|
|
1983
1993
|
// src/utils/fetch-rendered-html.ts
|
|
1984
1994
|
var FETCH_TIMEOUT_MS = 1e4;
|
|
@@ -2022,12 +2032,12 @@ function hasConsentDefaultCall(html) {
|
|
|
2022
2032
|
// src/audits/google-consent-mode.ts
|
|
2023
2033
|
var audit6 = {
|
|
2024
2034
|
id: "audits/google-consent-mode",
|
|
2025
|
-
title:
|
|
2026
|
-
description:
|
|
2035
|
+
title: __30("Google Consent Mode", "elementor"),
|
|
2036
|
+
description: __30(
|
|
2027
2037
|
"Google Analytics, Ads, or Tag Manager are running on this site and may not receive a consent signal, which risks losing conversion/analytics data and compliance exposure.",
|
|
2028
2038
|
"elementor"
|
|
2029
2039
|
),
|
|
2030
|
-
fixHint:
|
|
2040
|
+
fixHint: __30(
|
|
2031
2041
|
"Turn on Google Consent Mode in your cookie consent plugin so Google tags respect visitor consent choices.",
|
|
2032
2042
|
"elementor"
|
|
2033
2043
|
),
|
|
@@ -2036,19 +2046,19 @@ var audit6 = {
|
|
|
2036
2046
|
weight: 1,
|
|
2037
2047
|
evaluate: async (ctx) => {
|
|
2038
2048
|
if (!ctx.pageContext.frontend_url) {
|
|
2039
|
-
return { status: "skipped", reason:
|
|
2049
|
+
return { status: "skipped", reason: __30("Page is not published.", "elementor") };
|
|
2040
2050
|
}
|
|
2041
2051
|
const html = await fetchRenderedHtml(ctx.pageContext.frontend_url);
|
|
2042
2052
|
if (!html) {
|
|
2043
|
-
return { status: "skipped", reason:
|
|
2053
|
+
return { status: "skipped", reason: __30("Could not fetch the published page.", "elementor") };
|
|
2044
2054
|
}
|
|
2045
2055
|
if (!hasGoogleTracking(html)) {
|
|
2046
|
-
return { status: "skipped", reason:
|
|
2056
|
+
return { status: "skipped", reason: __30("No Google tracking product detected.", "elementor") };
|
|
2047
2057
|
}
|
|
2048
2058
|
if (hasConsentDefaultCall(html)) {
|
|
2049
2059
|
return { status: "pass" };
|
|
2050
2060
|
}
|
|
2051
|
-
const label =
|
|
2061
|
+
const label = __30("No Google Consent Mode signal was found on the page.", "elementor");
|
|
2052
2062
|
const isCookiezReady = ctx.pageContext.cookiez_plugin_installed && ctx.pageContext.cookiez_plugin_active;
|
|
2053
2063
|
if (isCookiezReady) {
|
|
2054
2064
|
return {
|
|
@@ -2057,7 +2067,7 @@ var audit6 = {
|
|
|
2057
2067
|
{
|
|
2058
2068
|
auditId: audit6.id,
|
|
2059
2069
|
label,
|
|
2060
|
-
ctaLabel:
|
|
2070
|
+
ctaLabel: __30("Enable", "elementor"),
|
|
2061
2071
|
externalUrl: ctx.pageContext.cookiez_consent_mode_settings_url
|
|
2062
2072
|
}
|
|
2063
2073
|
]
|
|
@@ -2077,7 +2087,7 @@ var audit6 = {
|
|
|
2077
2087
|
};
|
|
2078
2088
|
|
|
2079
2089
|
// src/audits/heading-structure.ts
|
|
2080
|
-
import { __ as
|
|
2090
|
+
import { __ as __31 } from "@wordpress/i18n";
|
|
2081
2091
|
var HEADING_LEVELS = ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
2082
2092
|
var HEADING_CONTROLS_REGISTRY = {
|
|
2083
2093
|
// Core
|
|
@@ -2255,27 +2265,27 @@ function extractPageHeadings(tree) {
|
|
|
2255
2265
|
}
|
|
2256
2266
|
var audit7 = {
|
|
2257
2267
|
id: "audits/heading-structure",
|
|
2258
|
-
title:
|
|
2259
|
-
description:
|
|
2260
|
-
fixHint:
|
|
2268
|
+
title: __31("Heading structure", "elementor"),
|
|
2269
|
+
description: __31("Pages should have exactly one H1 and a non-skipping heading order.", "elementor"),
|
|
2270
|
+
fixHint: __31("Ensure your page has one H1 and that heading levels do not skip (no H2 \u2192 H4).", "elementor"),
|
|
2261
2271
|
categories: ["seo", "accessibility"],
|
|
2262
2272
|
severity: "error",
|
|
2263
2273
|
weight: 10,
|
|
2264
2274
|
evaluate: (ctx) => {
|
|
2265
2275
|
if (ctx.elements.tree.length === 0) {
|
|
2266
|
-
return { status: "skipped", reason:
|
|
2276
|
+
return { status: "skipped", reason: __31("No elements", "elementor") };
|
|
2267
2277
|
}
|
|
2268
2278
|
const headings = extractPageHeadings(ctx.elements.tree);
|
|
2269
2279
|
const violations = [];
|
|
2270
2280
|
if (headings.length === 0) {
|
|
2271
2281
|
violations.push({
|
|
2272
2282
|
auditId: audit7.id,
|
|
2273
|
-
label:
|
|
2283
|
+
label: __31("No headings found on the page.", "elementor")
|
|
2274
2284
|
});
|
|
2275
2285
|
} else {
|
|
2276
2286
|
const h1Count = headings.filter((h) => h.level === 1).length;
|
|
2277
2287
|
if (h1Count === 0) {
|
|
2278
|
-
violations.push({ auditId: audit7.id, label:
|
|
2288
|
+
violations.push({ auditId: audit7.id, label: __31("No H1 on the page.", "elementor") });
|
|
2279
2289
|
}
|
|
2280
2290
|
if (h1Count > 1) {
|
|
2281
2291
|
headings.filter((h) => h.level === 1).slice(1).forEach(
|
|
@@ -2283,7 +2293,7 @@ var audit7 = {
|
|
|
2283
2293
|
auditId: audit7.id,
|
|
2284
2294
|
elementId: h.elementId,
|
|
2285
2295
|
targetHint: "element-settings",
|
|
2286
|
-
label:
|
|
2296
|
+
label: __31("More than one H1 on the page.", "elementor")
|
|
2287
2297
|
})
|
|
2288
2298
|
);
|
|
2289
2299
|
}
|
|
@@ -2293,7 +2303,7 @@ var audit7 = {
|
|
|
2293
2303
|
auditId: audit7.id,
|
|
2294
2304
|
elementId: headings[i].elementId,
|
|
2295
2305
|
targetHint: "element-settings",
|
|
2296
|
-
label:
|
|
2306
|
+
label: __31("Heading level skipped.", "elementor")
|
|
2297
2307
|
});
|
|
2298
2308
|
}
|
|
2299
2309
|
}
|
|
@@ -2303,24 +2313,24 @@ var audit7 = {
|
|
|
2303
2313
|
};
|
|
2304
2314
|
|
|
2305
2315
|
// src/audits/hidden-elements.ts
|
|
2306
|
-
import { __ as
|
|
2316
|
+
import { __ as __32 } from "@wordpress/i18n";
|
|
2307
2317
|
function isHiddenOnAllDevices(settings) {
|
|
2308
2318
|
return Boolean(settings.hide_desktop) && Boolean(settings.hide_tablet) && Boolean(settings.hide_mobile);
|
|
2309
2319
|
}
|
|
2310
2320
|
var audit8 = {
|
|
2311
2321
|
id: "audits/hidden-elements",
|
|
2312
|
-
title:
|
|
2313
|
-
description:
|
|
2322
|
+
title: __32("Hidden elements", "elementor"),
|
|
2323
|
+
description: __32(
|
|
2314
2324
|
"Elements hidden on all devices simultaneously are effectively dead code in the page tree.",
|
|
2315
2325
|
"elementor"
|
|
2316
2326
|
),
|
|
2317
|
-
fixHint:
|
|
2327
|
+
fixHint: __32("Remove the element or make it visible on at least one device breakpoint.", "elementor"),
|
|
2318
2328
|
categories: ["best-practices", "performance"],
|
|
2319
2329
|
severity: "info",
|
|
2320
2330
|
weight: 3,
|
|
2321
2331
|
evaluate: (ctx) => {
|
|
2322
2332
|
if (ctx.elements.tree.length === 0) {
|
|
2323
|
-
return { status: "skipped", reason:
|
|
2333
|
+
return { status: "skipped", reason: __32("No elements", "elementor") };
|
|
2324
2334
|
}
|
|
2325
2335
|
const violations = [];
|
|
2326
2336
|
walkElements(ctx.elements.tree, (node) => {
|
|
@@ -2329,7 +2339,7 @@ var audit8 = {
|
|
|
2329
2339
|
auditId: audit8.id,
|
|
2330
2340
|
elementId: node.id,
|
|
2331
2341
|
targetHint: "element-settings",
|
|
2332
|
-
label:
|
|
2342
|
+
label: __32("Element is hidden on all devices.", "elementor")
|
|
2333
2343
|
});
|
|
2334
2344
|
}
|
|
2335
2345
|
});
|
|
@@ -2338,7 +2348,7 @@ var audit8 = {
|
|
|
2338
2348
|
};
|
|
2339
2349
|
|
|
2340
2350
|
// src/audits/images-alt-text.ts
|
|
2341
|
-
import { __ as
|
|
2351
|
+
import { __ as __33 } from "@wordpress/i18n";
|
|
2342
2352
|
|
|
2343
2353
|
// src/utils/image-alt.ts
|
|
2344
2354
|
function hasMeaningfulAlt(media, pageContext) {
|
|
@@ -2358,15 +2368,15 @@ function isImageSourcePresent(media) {
|
|
|
2358
2368
|
// src/audits/images-alt-text.ts
|
|
2359
2369
|
var audit9 = {
|
|
2360
2370
|
id: "audits/images-alt-text",
|
|
2361
|
-
title:
|
|
2362
|
-
description:
|
|
2363
|
-
fixHint:
|
|
2371
|
+
title: __33("Images alt text", "elementor"),
|
|
2372
|
+
description: __33("Every image needs a meaningful alt attribute for screen readers and image-search.", "elementor"),
|
|
2373
|
+
fixHint: __33("Open the image's settings and add an Alt Text describing the image.", "elementor"),
|
|
2364
2374
|
categories: ["seo", "accessibility"],
|
|
2365
2375
|
severity: "error",
|
|
2366
2376
|
weight: 10,
|
|
2367
2377
|
evaluate: (ctx) => {
|
|
2368
2378
|
if (!hasPageImages(ctx.elements.tree)) {
|
|
2369
|
-
return { status: "skipped", reason:
|
|
2379
|
+
return { status: "skipped", reason: __33("No images", "elementor") };
|
|
2370
2380
|
}
|
|
2371
2381
|
const violations = [];
|
|
2372
2382
|
const failedWidgetIds = /* @__PURE__ */ new Set();
|
|
@@ -2382,7 +2392,7 @@ var audit9 = {
|
|
|
2382
2392
|
auditId: audit9.id,
|
|
2383
2393
|
elementId: node.id,
|
|
2384
2394
|
targetHint: "element-settings",
|
|
2385
|
-
label:
|
|
2395
|
+
label: __33("Image is missing alt text.", "elementor"),
|
|
2386
2396
|
externalUrl: ctx.pageContext.ally_plugin_url
|
|
2387
2397
|
});
|
|
2388
2398
|
}
|
|
@@ -2392,20 +2402,20 @@ var audit9 = {
|
|
|
2392
2402
|
};
|
|
2393
2403
|
|
|
2394
2404
|
// src/audits/images-too-large.ts
|
|
2395
|
-
import { __ as
|
|
2405
|
+
import { __ as __34, sprintf as sprintf4 } from "@wordpress/i18n";
|
|
2396
2406
|
var SIZE_THRESHOLD_BYTES = 500 * 1024;
|
|
2397
2407
|
var BYTES_PER_KB = 1024;
|
|
2398
2408
|
var audit10 = {
|
|
2399
2409
|
id: "audits/images-too-large",
|
|
2400
|
-
title:
|
|
2401
|
-
description:
|
|
2402
|
-
fixHint:
|
|
2410
|
+
title: __34("Oversized images", "elementor"),
|
|
2411
|
+
description: __34("Large image files slow down the page.", "elementor"),
|
|
2412
|
+
fixHint: __34("Replace the image with a smaller version or enable image optimization.", "elementor"),
|
|
2403
2413
|
categories: ["performance"],
|
|
2404
2414
|
severity: "warning",
|
|
2405
2415
|
weight: 7,
|
|
2406
2416
|
evaluate: (ctx) => {
|
|
2407
2417
|
if (!hasPageImages(ctx.elements.tree)) {
|
|
2408
|
-
return { status: "skipped", reason:
|
|
2418
|
+
return { status: "skipped", reason: __34("No images", "elementor") };
|
|
2409
2419
|
}
|
|
2410
2420
|
const widgetMaxKb = /* @__PURE__ */ new Map();
|
|
2411
2421
|
let oversizedImageCount = 0;
|
|
@@ -2427,9 +2437,9 @@ var audit10 = {
|
|
|
2427
2437
|
auditId: audit10.id,
|
|
2428
2438
|
elementId,
|
|
2429
2439
|
targetHint: "element-settings",
|
|
2430
|
-
label:
|
|
2440
|
+
label: sprintf4(
|
|
2431
2441
|
/* translators: %d is the image file size in kilobytes. */
|
|
2432
|
-
|
|
2442
|
+
__34("Image is %d KB (over 500 KB).", "elementor"),
|
|
2433
2443
|
kb
|
|
2434
2444
|
),
|
|
2435
2445
|
externalUrl: ctx.pageContext.image_optimization_plugin_url
|
|
@@ -2439,21 +2449,21 @@ var audit10 = {
|
|
|
2439
2449
|
};
|
|
2440
2450
|
|
|
2441
2451
|
// src/audits/nested-boxed-containers.ts
|
|
2442
|
-
import { __ as
|
|
2452
|
+
import { __ as __35 } from "@wordpress/i18n";
|
|
2443
2453
|
function isBoxed(settings) {
|
|
2444
2454
|
return settings.content_width === "boxed";
|
|
2445
2455
|
}
|
|
2446
2456
|
var audit11 = {
|
|
2447
2457
|
id: "audits/nested-boxed-containers",
|
|
2448
|
-
title:
|
|
2449
|
-
description:
|
|
2450
|
-
fixHint:
|
|
2458
|
+
title: __35("Boxed container nested inside a boxed parent", "elementor"),
|
|
2459
|
+
description: __35("An inner container does not need to be boxed when its parent already is.", "elementor"),
|
|
2460
|
+
fixHint: __35("Change the inner container's content width to Full Width.", "elementor"),
|
|
2451
2461
|
categories: ["best-practices", "performance"],
|
|
2452
2462
|
severity: "info",
|
|
2453
2463
|
weight: 5,
|
|
2454
2464
|
evaluate: (ctx) => {
|
|
2455
2465
|
if (ctx.elements.tree.length === 0) {
|
|
2456
|
-
return { status: "skipped", reason:
|
|
2466
|
+
return { status: "skipped", reason: __35("No elements", "elementor") };
|
|
2457
2467
|
}
|
|
2458
2468
|
const violations = [];
|
|
2459
2469
|
walkElements(ctx.elements.tree, (node, parents) => {
|
|
@@ -2466,7 +2476,7 @@ var audit11 = {
|
|
|
2466
2476
|
auditId: audit11.id,
|
|
2467
2477
|
elementId: node.id,
|
|
2468
2478
|
targetHint: "element-settings",
|
|
2469
|
-
label:
|
|
2479
|
+
label: __35("Nested boxed container.", "elementor")
|
|
2470
2480
|
});
|
|
2471
2481
|
}
|
|
2472
2482
|
});
|
|
@@ -2475,12 +2485,12 @@ var audit11 = {
|
|
|
2475
2485
|
};
|
|
2476
2486
|
|
|
2477
2487
|
// src/audits/page-excerpt.ts
|
|
2478
|
-
import { __ as
|
|
2488
|
+
import { __ as __36 } from "@wordpress/i18n";
|
|
2479
2489
|
var audit12 = {
|
|
2480
2490
|
id: "audits/page-excerpt",
|
|
2481
|
-
title:
|
|
2482
|
-
description:
|
|
2483
|
-
fixHint:
|
|
2491
|
+
title: __36("Page excerpt", "elementor"),
|
|
2492
|
+
description: __36("A descriptive excerpt helps search engines and previews summarize the page.", "elementor"),
|
|
2493
|
+
fixHint: __36("Open Page Settings and write a short excerpt.", "elementor"),
|
|
2484
2494
|
categories: ["seo"],
|
|
2485
2495
|
severity: "warning",
|
|
2486
2496
|
weight: 5,
|
|
@@ -2493,7 +2503,7 @@ var audit12 = {
|
|
|
2493
2503
|
violations: [
|
|
2494
2504
|
{
|
|
2495
2505
|
auditId: audit12.id,
|
|
2496
|
-
label:
|
|
2506
|
+
label: __36("Page has no excerpt.", "elementor"),
|
|
2497
2507
|
targetHint: "page-settings",
|
|
2498
2508
|
angieFix: true
|
|
2499
2509
|
}
|
|
@@ -2503,12 +2513,12 @@ var audit12 = {
|
|
|
2503
2513
|
};
|
|
2504
2514
|
|
|
2505
2515
|
// src/audits/page-featured-image.ts
|
|
2506
|
-
import { __ as
|
|
2516
|
+
import { __ as __37 } from "@wordpress/i18n";
|
|
2507
2517
|
var audit13 = {
|
|
2508
2518
|
id: "audits/page-featured-image",
|
|
2509
|
-
title:
|
|
2510
|
-
description:
|
|
2511
|
-
fixHint:
|
|
2519
|
+
title: __37("Page featured image", "elementor"),
|
|
2520
|
+
description: __37("Featured images are used by social shares and many themes for hero visuals.", "elementor"),
|
|
2521
|
+
fixHint: __37("Open Page Settings and set a featured image.", "elementor"),
|
|
2512
2522
|
categories: ["seo"],
|
|
2513
2523
|
severity: "info",
|
|
2514
2524
|
weight: 5,
|
|
@@ -2521,7 +2531,7 @@ var audit13 = {
|
|
|
2521
2531
|
violations: [
|
|
2522
2532
|
{
|
|
2523
2533
|
auditId: audit13.id,
|
|
2524
|
-
label:
|
|
2534
|
+
label: __37("No featured image set.", "elementor"),
|
|
2525
2535
|
targetHint: "page-settings"
|
|
2526
2536
|
}
|
|
2527
2537
|
]
|
|
@@ -2530,13 +2540,13 @@ var audit13 = {
|
|
|
2530
2540
|
};
|
|
2531
2541
|
|
|
2532
2542
|
// src/audits/page-title.ts
|
|
2533
|
-
import { __ as
|
|
2543
|
+
import { __ as __38 } from "@wordpress/i18n";
|
|
2534
2544
|
var MAX_TITLE_LENGTH = 60;
|
|
2535
2545
|
var audit14 = {
|
|
2536
2546
|
id: "audits/page-title",
|
|
2537
|
-
title:
|
|
2538
|
-
description:
|
|
2539
|
-
fixHint:
|
|
2547
|
+
title: __38("Page title", "elementor"),
|
|
2548
|
+
description: __38("Pages need a clear title for SEO and screen-reader navigation.", "elementor"),
|
|
2549
|
+
fixHint: __38("Open Page Settings and add a title.", "elementor"),
|
|
2540
2550
|
categories: ["seo"],
|
|
2541
2551
|
severity: "error",
|
|
2542
2552
|
weight: 10,
|
|
@@ -2548,7 +2558,7 @@ var audit14 = {
|
|
|
2548
2558
|
violations: [
|
|
2549
2559
|
{
|
|
2550
2560
|
auditId: audit14.id,
|
|
2551
|
-
label:
|
|
2561
|
+
label: __38("Page has no title.", "elementor"),
|
|
2552
2562
|
targetHint: "page-settings",
|
|
2553
2563
|
angieFix: true
|
|
2554
2564
|
}
|
|
@@ -2561,7 +2571,7 @@ var audit14 = {
|
|
|
2561
2571
|
violations: [
|
|
2562
2572
|
{
|
|
2563
2573
|
auditId: audit14.id,
|
|
2564
|
-
label:
|
|
2574
|
+
label: __38("Page title is too long.", "elementor"),
|
|
2565
2575
|
targetHint: "page-settings",
|
|
2566
2576
|
angieFix: true
|
|
2567
2577
|
}
|
|
@@ -2573,7 +2583,7 @@ var audit14 = {
|
|
|
2573
2583
|
};
|
|
2574
2584
|
|
|
2575
2585
|
// src/audits/prefer-global-colors.ts
|
|
2576
|
-
import { __ as
|
|
2586
|
+
import { __ as __39, sprintf as sprintf5 } from "@wordpress/i18n";
|
|
2577
2587
|
|
|
2578
2588
|
// src/utils/collect-hardcoded-colors.ts
|
|
2579
2589
|
var RESERVED_SETTING_KEYS = /* @__PURE__ */ new Set(["__globals__", "__dynamic__"]);
|
|
@@ -2641,18 +2651,18 @@ function findMatchingGlobalByValue(value, globals) {
|
|
|
2641
2651
|
// src/audits/prefer-global-colors.ts
|
|
2642
2652
|
var audit15 = {
|
|
2643
2653
|
id: "audits/prefer-global-colors",
|
|
2644
|
-
title:
|
|
2645
|
-
description:
|
|
2646
|
-
fixHint:
|
|
2654
|
+
title: __39("Prefer global colors", "elementor"),
|
|
2655
|
+
description: __39("Global colors make the design consistent and easy to update site-wide.", "elementor"),
|
|
2656
|
+
fixHint: __39("Replace the hard-coded value with the matching global color.", "elementor"),
|
|
2647
2657
|
categories: ["best-practices"],
|
|
2648
2658
|
severity: "info",
|
|
2649
2659
|
weight: 3,
|
|
2650
2660
|
evaluate: (ctx) => {
|
|
2651
2661
|
if (ctx.elements.tree.length === 0) {
|
|
2652
|
-
return { status: "skipped", reason:
|
|
2662
|
+
return { status: "skipped", reason: __39("No elements", "elementor") };
|
|
2653
2663
|
}
|
|
2654
2664
|
if (ctx.kit.globals.colors.length === 0) {
|
|
2655
|
-
return { status: "skipped", reason:
|
|
2665
|
+
return { status: "skipped", reason: __39("No global colors", "elementor") };
|
|
2656
2666
|
}
|
|
2657
2667
|
const violations = [];
|
|
2658
2668
|
walkElements(ctx.elements.tree, (node) => {
|
|
@@ -2666,9 +2676,9 @@ var audit15 = {
|
|
|
2666
2676
|
elementId: node.id,
|
|
2667
2677
|
targetHint: "element-settings",
|
|
2668
2678
|
angieFix: true,
|
|
2669
|
-
label:
|
|
2679
|
+
label: sprintf5(
|
|
2670
2680
|
/* translators: 1: hard-coded color value, 2: global color title. */
|
|
2671
|
-
|
|
2681
|
+
__39('replace "%1$s" with "%2$s" global color', "elementor"),
|
|
2672
2682
|
value,
|
|
2673
2683
|
global.title
|
|
2674
2684
|
)
|
|
@@ -2680,7 +2690,7 @@ var audit15 = {
|
|
|
2680
2690
|
};
|
|
2681
2691
|
|
|
2682
2692
|
// src/audits/prefer-global-fonts.ts
|
|
2683
|
-
import { __ as
|
|
2693
|
+
import { __ as __40, sprintf as sprintf6 } from "@wordpress/i18n";
|
|
2684
2694
|
|
|
2685
2695
|
// src/utils/collect-hardcoded-fonts.ts
|
|
2686
2696
|
var RESERVED_SETTING_KEYS2 = /* @__PURE__ */ new Set(["__globals__", "__dynamic__"]);
|
|
@@ -2740,18 +2750,18 @@ function collectHardcodedFonts(settings, pathPrefix = "") {
|
|
|
2740
2750
|
// src/audits/prefer-global-fonts.ts
|
|
2741
2751
|
var audit16 = {
|
|
2742
2752
|
id: "audits/prefer-global-fonts",
|
|
2743
|
-
title:
|
|
2744
|
-
description:
|
|
2745
|
-
fixHint:
|
|
2753
|
+
title: __40("Prefer global fonts", "elementor"),
|
|
2754
|
+
description: __40("Global fonts make the design consistent and easy to update site-wide.", "elementor"),
|
|
2755
|
+
fixHint: __40("Replace the hard-coded value with the matching global font.", "elementor"),
|
|
2746
2756
|
categories: ["best-practices", "performance"],
|
|
2747
2757
|
severity: "info",
|
|
2748
2758
|
weight: 3,
|
|
2749
2759
|
evaluate: (ctx) => {
|
|
2750
2760
|
if (ctx.elements.tree.length === 0) {
|
|
2751
|
-
return { status: "skipped", reason:
|
|
2761
|
+
return { status: "skipped", reason: __40("No elements", "elementor") };
|
|
2752
2762
|
}
|
|
2753
2763
|
if (ctx.kit.globals.fonts.length === 0) {
|
|
2754
|
-
return { status: "skipped", reason:
|
|
2764
|
+
return { status: "skipped", reason: __40("No global fonts", "elementor") };
|
|
2755
2765
|
}
|
|
2756
2766
|
const violations = [];
|
|
2757
2767
|
walkElements(ctx.elements.tree, (node) => {
|
|
@@ -2764,9 +2774,9 @@ var audit16 = {
|
|
|
2764
2774
|
auditId: audit16.id,
|
|
2765
2775
|
elementId: node.id,
|
|
2766
2776
|
targetHint: "element-settings",
|
|
2767
|
-
label:
|
|
2777
|
+
label: sprintf6(
|
|
2768
2778
|
/* translators: %s: global font title. */
|
|
2769
|
-
|
|
2779
|
+
__40('replace hardcoded typography with "%s" global font', "elementor"),
|
|
2770
2780
|
global.title
|
|
2771
2781
|
)
|
|
2772
2782
|
});
|
|
@@ -2777,15 +2787,15 @@ var audit16 = {
|
|
|
2777
2787
|
};
|
|
2778
2788
|
|
|
2779
2789
|
// src/audits/privacy-policy.ts
|
|
2780
|
-
import { __ as
|
|
2790
|
+
import { __ as __41 } from "@wordpress/i18n";
|
|
2781
2791
|
var audit17 = {
|
|
2782
2792
|
id: "audits/privacy-policy",
|
|
2783
|
-
title:
|
|
2784
|
-
description:
|
|
2793
|
+
title: __41("Privacy policy", "elementor"),
|
|
2794
|
+
description: __41(
|
|
2785
2795
|
"A privacy policy page is required by privacy regulations such as GDPR (EU) and CCPA (US).",
|
|
2786
2796
|
"elementor"
|
|
2787
2797
|
),
|
|
2788
|
-
fixHint:
|
|
2798
|
+
fixHint: __41(
|
|
2789
2799
|
"Go to Settings > Privacy in the WordPress admin and assign a published privacy policy page.",
|
|
2790
2800
|
"elementor"
|
|
2791
2801
|
),
|
|
@@ -2801,9 +2811,9 @@ var audit17 = {
|
|
|
2801
2811
|
violations: [
|
|
2802
2812
|
{
|
|
2803
2813
|
auditId: audit17.id,
|
|
2804
|
-
label:
|
|
2814
|
+
label: __41("No privacy policy page is set.", "elementor"),
|
|
2805
2815
|
externalUrl: ctx.pageContext.privacy_settings_url,
|
|
2806
|
-
ctaLabel:
|
|
2816
|
+
ctaLabel: __41("Create", "elementor")
|
|
2807
2817
|
}
|
|
2808
2818
|
]
|
|
2809
2819
|
};
|
|
@@ -2811,15 +2821,15 @@ var audit17 = {
|
|
|
2811
2821
|
};
|
|
2812
2822
|
|
|
2813
2823
|
// src/audits/robots-noindex.ts
|
|
2814
|
-
import { __ as
|
|
2824
|
+
import { __ as __42 } from "@wordpress/i18n";
|
|
2815
2825
|
var audit18 = {
|
|
2816
2826
|
id: "audits/robots-noindex",
|
|
2817
|
-
title:
|
|
2818
|
-
description:
|
|
2827
|
+
title: __42("Search engine visibility", "elementor"),
|
|
2828
|
+
description: __42(
|
|
2819
2829
|
"When search engine visibility is checked in WordPress Settings -> Reading -> Search Engine Visibility, search engines are discouraged from indexing the website.",
|
|
2820
2830
|
"elementor"
|
|
2821
2831
|
),
|
|
2822
|
-
fixHint:
|
|
2832
|
+
fixHint: __42(
|
|
2823
2833
|
'Go to Settings \u2192 Reading in the WordPress admin and uncheck "Discourage search engines from indexing this site" when the website should be indexed.',
|
|
2824
2834
|
"elementor"
|
|
2825
2835
|
),
|
|
@@ -2835,7 +2845,7 @@ var audit18 = {
|
|
|
2835
2845
|
violations: [
|
|
2836
2846
|
{
|
|
2837
2847
|
auditId: audit18.id,
|
|
2838
|
-
label:
|
|
2848
|
+
label: __42("Search engines are discouraged from indexing this website.", "elementor"),
|
|
2839
2849
|
externalUrl: ctx.pageContext.reading_settings_url
|
|
2840
2850
|
}
|
|
2841
2851
|
]
|
|
@@ -2844,15 +2854,15 @@ var audit18 = {
|
|
|
2844
2854
|
};
|
|
2845
2855
|
|
|
2846
2856
|
// src/audits/scan-for-cookies.ts
|
|
2847
|
-
import { __ as
|
|
2857
|
+
import { __ as __43 } from "@wordpress/i18n";
|
|
2848
2858
|
var audit19 = {
|
|
2849
2859
|
id: "audits/scan-for-cookies",
|
|
2850
|
-
title:
|
|
2851
|
-
description:
|
|
2860
|
+
title: __43("Scan for cookies", "elementor"),
|
|
2861
|
+
description: __43(
|
|
2852
2862
|
"Your site may be setting cookies you haven't disclosed. Some countries require a banner even without a full consent policy. Scan to see what needs disclosure.",
|
|
2853
2863
|
"elementor"
|
|
2854
2864
|
),
|
|
2855
|
-
fixHint:
|
|
2865
|
+
fixHint: __43("Run a Cookiez scan on this page to see which cookies need disclosure.", "elementor"),
|
|
2856
2866
|
categories: ["compliance"],
|
|
2857
2867
|
severity: "info",
|
|
2858
2868
|
weight: 0,
|
|
@@ -2863,7 +2873,7 @@ var audit19 = {
|
|
|
2863
2873
|
violations: [
|
|
2864
2874
|
{
|
|
2865
2875
|
auditId: audit19.id,
|
|
2866
|
-
label:
|
|
2876
|
+
label: __43("This page has not been scanned for cookies yet.", "elementor"),
|
|
2867
2877
|
externalUrl: isReady ? ctx.pageContext.cookiez_scan_url : ctx.pageContext.cookiez_plugin_action_url
|
|
2868
2878
|
}
|
|
2869
2879
|
]
|
|
@@ -2872,21 +2882,21 @@ var audit19 = {
|
|
|
2872
2882
|
};
|
|
2873
2883
|
|
|
2874
2884
|
// src/audits/sections-and-columns.ts
|
|
2875
|
-
import { __ as
|
|
2885
|
+
import { __ as __44 } from "@wordpress/i18n";
|
|
2876
2886
|
var audit20 = {
|
|
2877
2887
|
id: "audits/sections-and-columns",
|
|
2878
|
-
title:
|
|
2879
|
-
description:
|
|
2888
|
+
title: __44("Sections and columns", "elementor"),
|
|
2889
|
+
description: __44(
|
|
2880
2890
|
"Sections and columns are legacy elements. Containers render fewer DOM nodes and are more flexible.",
|
|
2881
2891
|
"elementor"
|
|
2882
2892
|
),
|
|
2883
|
-
fixHint:
|
|
2893
|
+
fixHint: __44("Use the Container Converter to replace each section/column with a container.", "elementor"),
|
|
2884
2894
|
categories: ["best-practices", "performance"],
|
|
2885
2895
|
severity: "warning",
|
|
2886
2896
|
weight: 7,
|
|
2887
2897
|
evaluate: (ctx) => {
|
|
2888
2898
|
if (ctx.elements.tree.length === 0) {
|
|
2889
|
-
return { status: "skipped", reason:
|
|
2899
|
+
return { status: "skipped", reason: __44("No elements", "elementor") };
|
|
2890
2900
|
}
|
|
2891
2901
|
const violations = [];
|
|
2892
2902
|
walkElements(ctx.elements.tree, (node) => {
|
|
@@ -2894,7 +2904,7 @@ var audit20 = {
|
|
|
2894
2904
|
violations.push({
|
|
2895
2905
|
auditId: audit20.id,
|
|
2896
2906
|
elementId: node.id,
|
|
2897
|
-
label: node.elType === "section" ?
|
|
2907
|
+
label: node.elType === "section" ? __44("Section element", "elementor") : __44("Column element", "elementor")
|
|
2898
2908
|
});
|
|
2899
2909
|
}
|
|
2900
2910
|
});
|
|
@@ -2903,15 +2913,15 @@ var audit20 = {
|
|
|
2903
2913
|
};
|
|
2904
2914
|
|
|
2905
2915
|
// src/audits/site-identity.ts
|
|
2906
|
-
import { __ as
|
|
2916
|
+
import { __ as __45 } from "@wordpress/i18n";
|
|
2907
2917
|
var audit21 = {
|
|
2908
2918
|
id: "audits/site-identity",
|
|
2909
|
-
title:
|
|
2910
|
-
description:
|
|
2919
|
+
title: __45("Site identity", "elementor"),
|
|
2920
|
+
description: __45(
|
|
2911
2921
|
"Site name, description, logo, and favicon establish your brand and appear in search results and browser tabs.",
|
|
2912
2922
|
"elementor"
|
|
2913
2923
|
),
|
|
2914
|
-
fixHint:
|
|
2924
|
+
fixHint: __45("Open Site Settings \u2192 Site Identity and complete all the missing fields.", "elementor"),
|
|
2915
2925
|
categories: ["best-practices", "seo"],
|
|
2916
2926
|
severity: "info",
|
|
2917
2927
|
weight: 7,
|
|
@@ -2921,14 +2931,14 @@ var audit21 = {
|
|
|
2921
2931
|
if (!identity.site_name_set) {
|
|
2922
2932
|
violations.push({
|
|
2923
2933
|
auditId: audit21.id,
|
|
2924
|
-
label:
|
|
2934
|
+
label: __45("Site name is missing or still uses the default.", "elementor"),
|
|
2925
2935
|
targetHint: "site-identity-settings"
|
|
2926
2936
|
});
|
|
2927
2937
|
}
|
|
2928
2938
|
if (!identity.site_description_set) {
|
|
2929
2939
|
violations.push({
|
|
2930
2940
|
auditId: audit21.id,
|
|
2931
|
-
label:
|
|
2941
|
+
label: __45("Site description is missing or still uses the default.", "elementor"),
|
|
2932
2942
|
targetHint: "site-identity-settings",
|
|
2933
2943
|
angieFix: true
|
|
2934
2944
|
});
|
|
@@ -2936,14 +2946,14 @@ var audit21 = {
|
|
|
2936
2946
|
if (!identity.site_logo_set) {
|
|
2937
2947
|
violations.push({
|
|
2938
2948
|
auditId: audit21.id,
|
|
2939
|
-
label:
|
|
2949
|
+
label: __45("Site logo is not set.", "elementor"),
|
|
2940
2950
|
targetHint: "site-identity-settings"
|
|
2941
2951
|
});
|
|
2942
2952
|
}
|
|
2943
2953
|
if (!identity.site_favicon_set) {
|
|
2944
2954
|
violations.push({
|
|
2945
2955
|
auditId: audit21.id,
|
|
2946
|
-
label:
|
|
2956
|
+
label: __45("Site favicon is not set.", "elementor"),
|
|
2947
2957
|
targetHint: "site-identity-settings"
|
|
2948
2958
|
});
|
|
2949
2959
|
}
|
|
@@ -2959,7 +2969,7 @@ var audit21 = {
|
|
|
2959
2969
|
|
|
2960
2970
|
// src/audits/too-many-widgets.ts
|
|
2961
2971
|
import { getWidgetsCache as getWidgetsCache3 } from "@elementor/editor-elements";
|
|
2962
|
-
import { __ as
|
|
2972
|
+
import { __ as __46 } from "@wordpress/i18n";
|
|
2963
2973
|
var WIDGET_COUNT_THRESHOLD = 100;
|
|
2964
2974
|
function isCountableWidget(node, widgetsCache) {
|
|
2965
2975
|
if (node.elType === "widget") {
|
|
@@ -2969,15 +2979,15 @@ function isCountableWidget(node, widgetsCache) {
|
|
|
2969
2979
|
}
|
|
2970
2980
|
var audit22 = {
|
|
2971
2981
|
id: "audits/too-many-widgets",
|
|
2972
|
-
title:
|
|
2973
|
-
description:
|
|
2974
|
-
fixHint:
|
|
2982
|
+
title: __46("Too many widgets", "elementor"),
|
|
2983
|
+
description: __46("Excessive DOM size caused by too many widgets degrades rendering performance.", "elementor"),
|
|
2984
|
+
fixHint: __46("Reduce the number of widgets on the page by removing or combining elements.", "elementor"),
|
|
2975
2985
|
categories: ["best-practices", "performance"],
|
|
2976
2986
|
severity: "warning",
|
|
2977
2987
|
weight: 5,
|
|
2978
2988
|
evaluate: (ctx) => {
|
|
2979
2989
|
if (ctx.elements.tree.length === 0) {
|
|
2980
|
-
return { status: "skipped", reason:
|
|
2990
|
+
return { status: "skipped", reason: __46("No elements", "elementor") };
|
|
2981
2991
|
}
|
|
2982
2992
|
const widgetsCache = getWidgetsCache3();
|
|
2983
2993
|
let widgetCount = 0;
|
|
@@ -2994,7 +3004,7 @@ var audit22 = {
|
|
|
2994
3004
|
violations: [
|
|
2995
3005
|
{
|
|
2996
3006
|
auditId: audit22.id,
|
|
2997
|
-
label:
|
|
3007
|
+
label: __46("Page has too many widgets.", "elementor")
|
|
2998
3008
|
}
|
|
2999
3009
|
]
|
|
3000
3010
|
};
|