@atlaskit/section-message 8.2.1 → 8.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/section-message
2
2
 
3
+ ## 8.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#138039](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138039)
8
+ [`3e513ed430ccc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3e513ed430ccc) -
9
+ Fix accessibility issue where list was inappropriately used for actions when single action was
10
+ passed.
11
+
12
+ ## 8.2.2
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
3
18
  ## 8.2.1
4
19
 
5
20
  ### Patch Changes
@@ -80,14 +80,20 @@ var SectionMessage = /*#__PURE__*/(0, _react.forwardRef)(function SectionMessage
80
80
  testId: testId && "".concat(testId, "--actions"),
81
81
  separator: "\xB7",
82
82
  space: "space.100",
83
- rowSpace: "space.0",
84
- role: "list",
83
+ rowSpace: "space.0"
84
+ // Only use a list role if more than one action is present
85
+ ,
86
+ role: actionsArray.length > 1 ? 'list' : undefined,
85
87
  xcss: (0, _platformFeatureFlags.fg)('platform_ads_explicit_font_styles') && sectionMessageStyles.actionsContainer
86
88
  }, actionsArray.map(function (action, id) {
87
- return /*#__PURE__*/_react.default.createElement(_compiled.Inline, {
88
- role: "listitem",
89
- key: id
90
- }, action);
89
+ return (
90
+ /*#__PURE__*/
91
+ // Only use a listitem role if more than one action is present
92
+ _react.default.createElement(_compiled.Inline, {
93
+ role: actionsArray.length > 1 ? 'listitem' : undefined,
94
+ key: id
95
+ }, action)
96
+ );
91
97
  })))));
92
98
  });
93
99
  var appearanceMap = {
@@ -71,11 +71,16 @@ const SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage({
71
71
  testId: testId && `${testId}--actions`,
72
72
  separator: "\xB7",
73
73
  space: "space.100",
74
- rowSpace: "space.0",
75
- role: "list",
74
+ rowSpace: "space.0"
75
+ // Only use a list role if more than one action is present
76
+ ,
77
+ role: actionsArray.length > 1 ? 'list' : undefined,
76
78
  xcss: fg('platform_ads_explicit_font_styles') && sectionMessageStyles.actionsContainer
77
- }, actionsArray.map((action, id) => /*#__PURE__*/React.createElement(Inline, {
78
- role: "listitem",
79
+ }, actionsArray.map((action, id) =>
80
+ /*#__PURE__*/
81
+ // Only use a listitem role if more than one action is present
82
+ React.createElement(Inline, {
83
+ role: actionsArray.length > 1 ? 'listitem' : undefined,
79
84
  key: id
80
85
  }, action))))));
81
86
  });
@@ -70,14 +70,20 @@ var SectionMessage = /*#__PURE__*/forwardRef(function SectionMessage(_ref, ref)
70
70
  testId: testId && "".concat(testId, "--actions"),
71
71
  separator: "\xB7",
72
72
  space: "space.100",
73
- rowSpace: "space.0",
74
- role: "list",
73
+ rowSpace: "space.0"
74
+ // Only use a list role if more than one action is present
75
+ ,
76
+ role: actionsArray.length > 1 ? 'list' : undefined,
75
77
  xcss: fg('platform_ads_explicit_font_styles') && sectionMessageStyles.actionsContainer
76
78
  }, actionsArray.map(function (action, id) {
77
- return /*#__PURE__*/React.createElement(Inline, {
78
- role: "listitem",
79
- key: id
80
- }, action);
79
+ return (
80
+ /*#__PURE__*/
81
+ // Only use a listitem role if more than one action is present
82
+ React.createElement(Inline, {
83
+ role: actionsArray.length > 1 ? 'listitem' : undefined,
84
+ key: id
85
+ }, action)
86
+ );
81
87
  })))));
82
88
  });
83
89
  var appearanceMap = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/section-message",
3
- "version": "8.2.1",
3
+ "version": "8.2.3",
4
4
  "description": "A section message is used to alert users to a particular section of the screen.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,15 +39,15 @@
39
39
  ".": "./src/index.tsx"
40
40
  },
41
41
  "dependencies": {
42
- "@atlaskit/button": "^22.0.0",
42
+ "@atlaskit/button": "^23.0.0",
43
43
  "@atlaskit/codemod-utils": "^4.2.0",
44
44
  "@atlaskit/css": "^0.10.0",
45
45
  "@atlaskit/heading": "^5.1.0",
46
- "@atlaskit/icon": "^25.2.0",
46
+ "@atlaskit/icon": "^25.5.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/primitives": "^14.2.0",
48
+ "@atlaskit/primitives": "^14.3.0",
49
49
  "@atlaskit/theme": "^18.0.0",
50
- "@atlaskit/tokens": "^4.5.0",
50
+ "@atlaskit/tokens": "^4.7.0",
51
51
  "@babel/runtime": "^7.0.0"
52
52
  },
53
53
  "peerDependencies": {
@@ -58,14 +58,14 @@
58
58
  "@af/integration-testing": "^0.5.0",
59
59
  "@af/visual-regression": "^1.3.0",
60
60
  "@atlaskit/analytics-next": "^11.0.0",
61
- "@atlaskit/code": "^16.1.0",
61
+ "@atlaskit/code": "^17.0.0",
62
62
  "@atlaskit/docs": "^10.0.0",
63
63
  "@atlaskit/ds-lib": "^4.0.0",
64
64
  "@atlaskit/form": "^12.0.0",
65
- "@atlaskit/link": "^3.0.0",
65
+ "@atlaskit/link": "^3.1.0",
66
66
  "@atlaskit/range": "^9.0.0",
67
- "@atlaskit/ssr": "^0.4.0",
68
67
  "@atlassian/feature-flags-test-utils": "^0.3.0",
68
+ "@atlassian/ssr-tests": "^0.2.0",
69
69
  "@testing-library/react": "^13.4.0",
70
70
  "react-dom": "^18.2.0",
71
71
  "typescript": "~5.4.2"