@blocklet/ui-react 2.7.4 → 2.7.6

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.
@@ -41,6 +41,7 @@ export default function Links({
41
41
  } else if (link) {
42
42
  result = /*#__PURE__*/_jsx("a", {
43
43
  href: link,
44
+ "aria-label": `Footer link for ${label}`,
44
45
  ...props,
45
46
  children: label
46
47
  });
@@ -13,24 +13,21 @@ export default function SocialMedia({
13
13
  return /*#__PURE__*/_jsx(Root, {
14
14
  ...rest,
15
15
  children: items.map((item, i) => {
16
- return (
17
- /*#__PURE__*/
18
- // eslint-disable-next-line react/no-array-index-key
19
- _jsx("a", {
20
- href: item.link,
21
- target: "_blank",
22
- rel: "noreferrer",
23
- children: /*#__PURE__*/_jsx(Icon, {
24
- icon: item.icon || item.title,
25
- sx: {
26
- bgcolor: theme.palette.grey[600],
27
- color: '#fff'
28
- },
29
- size: 24,
30
- component: "span"
31
- })
32
- }, i)
33
- );
16
+ return /*#__PURE__*/_jsx("a", {
17
+ href: item.link,
18
+ target: "_blank",
19
+ "aria-label": `Social media icon${item.title ? ` for ${item.title}` : ''}`,
20
+ rel: "noreferrer",
21
+ children: /*#__PURE__*/_jsx(Icon, {
22
+ icon: item.icon || item.title,
23
+ sx: {
24
+ bgcolor: theme.palette.grey[600],
25
+ color: '#fff'
26
+ },
27
+ size: 24,
28
+ component: "span"
29
+ })
30
+ }, i);
34
31
  })
35
32
  });
36
33
  }
@@ -129,7 +129,7 @@ function Header({
129
129
  items: navItems,
130
130
  className: "header-nav",
131
131
  bgColor: "transparent",
132
- textColor: "#888"
132
+ textColor: "#777"
133
133
  })
134
134
  })
135
135
  });
@@ -59,7 +59,8 @@ function Links(_ref) {
59
59
  });
60
60
  } else if (link) {
61
61
  result = /*#__PURE__*/(0, _jsxRuntime.jsx)("a", _objectSpread(_objectSpread({
62
- href: link
62
+ href: link,
63
+ "aria-label": "Footer link for ".concat(label)
63
64
  }, props), {}, {
64
65
  children: label
65
66
  }));
@@ -30,24 +30,21 @@ function SocialMedia(_ref) {
30
30
  }
31
31
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Root, _objectSpread(_objectSpread({}, rest), {}, {
32
32
  children: items.map((item, i) => {
33
- return (
34
- /*#__PURE__*/
35
- // eslint-disable-next-line react/no-array-index-key
36
- (0, _jsxRuntime.jsx)("a", {
37
- href: item.link,
38
- target: "_blank",
39
- rel: "noreferrer",
40
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
41
- icon: item.icon || item.title,
42
- sx: {
43
- bgcolor: theme.palette.grey[600],
44
- color: '#fff'
45
- },
46
- size: 24,
47
- component: "span"
48
- })
49
- }, i)
50
- );
33
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
34
+ href: item.link,
35
+ target: "_blank",
36
+ "aria-label": "Social media icon".concat(item.title ? " for ".concat(item.title) : ''),
37
+ rel: "noreferrer",
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
39
+ icon: item.icon || item.title,
40
+ sx: {
41
+ bgcolor: theme.palette.grey[600],
42
+ color: '#fff'
43
+ },
44
+ size: 24,
45
+ component: "span"
46
+ })
47
+ }, i);
51
48
  })
52
49
  }));
53
50
  }
@@ -149,7 +149,7 @@ function Header(_ref) {
149
149
  items: navItems,
150
150
  className: "header-nav",
151
151
  bgColor: "transparent",
152
- textColor: "#888"
152
+ textColor: "#777"
153
153
  });
154
154
  }
155
155
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/ui-react",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
4
4
  "description": "Some useful front-end web components that can be used in Blocklets.",
5
5
  "keywords": [
6
6
  "react",
@@ -61,8 +61,8 @@
61
61
  }
62
62
  },
63
63
  "dependencies": {
64
- "@arcblock/did-connect": "^2.7.4",
65
- "@arcblock/ux": "^2.7.4",
64
+ "@arcblock/did-connect": "^2.7.6",
65
+ "@arcblock/ux": "^2.7.6",
66
66
  "@emotion/react": "^11.10.4",
67
67
  "@emotion/styled": "^11.10.4",
68
68
  "@mui/material": "^5.10.8",
@@ -85,5 +85,5 @@
85
85
  "glob": "^10.3.3",
86
86
  "jest": "^28.1.3"
87
87
  },
88
- "gitHead": "81f93ecac6724ea94ed1bb2410d2826a1e4c0f67"
88
+ "gitHead": "a47afa17248bfa0e1f164fa1122971433558b89f"
89
89
  }
@@ -23,7 +23,7 @@ export default function Links({ links, flowLayout, ...rest }) {
23
23
  result = render({ label, link, props });
24
24
  } else if (link) {
25
25
  result = (
26
- <a href={link} {...props}>
26
+ <a href={link} aria-label={`Footer link for ${label}`} {...props}>
27
27
  {label}
28
28
  </a>
29
29
  );
@@ -11,8 +11,13 @@ export default function SocialMedia({ items, ...rest }) {
11
11
  <Root {...rest}>
12
12
  {items.map((item, i) => {
13
13
  return (
14
- // eslint-disable-next-line react/no-array-index-key
15
- <a key={i} href={item.link} target="_blank" rel="noreferrer">
14
+ <a
15
+ // eslint-disable-next-line react/no-array-index-key
16
+ key={i}
17
+ href={item.link}
18
+ target="_blank"
19
+ aria-label={`Social media icon${item.title ? ` for ${item.title}` : ''}`}
20
+ rel="noreferrer">
16
21
  <Icon
17
22
  icon={item.icon || item.title}
18
23
  sx={{ bgcolor: theme.palette.grey[600], color: '#fff' }}
@@ -104,7 +104,7 @@ function Header({ meta, addons, sessionManagerProps, homeLink, theme: themeOverr
104
104
  items={navItems}
105
105
  className="header-nav"
106
106
  bgColor="transparent"
107
- textColor="#888"
107
+ textColor="#777"
108
108
  />
109
109
  )}
110
110
  </StyledUxHeader>