@atlaskit/media-viewer 54.5.21 → 54.5.23

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/media-viewer
2
2
 
3
+ ## 54.5.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 54.5.22
10
+
11
+ ### Patch Changes
12
+
13
+ - [`96d0a30ad758d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96d0a30ad758d) -
14
+ [ux] A11Y-35379: Give the media viewer previous/next navigation buttons more descriptive
15
+ accessible names ("Previous attachment" / "Next attachment") so screen reader users can identify
16
+ their purpose. Gated behind `platform_media_a11y_nav_button_labels`.
17
+
3
18
  ## 54.5.21
4
19
 
5
20
  ### Patch Changes
@@ -10,7 +10,7 @@ exports.packageVersion = exports.packageName = void 0;
10
10
  var _analytics = require("@atlaskit/media-common/analytics");
11
11
  var componentName = exports.component = exports.componentName = 'mediaViewer';
12
12
  var packageName = exports.packageName = "@atlaskit/media-viewer";
13
- var packageVersion = exports.packageVersion = "54.5.20";
13
+ var packageVersion = exports.packageVersion = "54.5.22";
14
14
  function getFileAttributes(fileState) {
15
15
  if (!fileState) {
16
16
  return {
@@ -13,7 +13,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
14
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15
15
  var packageName = "@atlaskit/media-viewer";
16
- var packageVersion = "54.5.20";
16
+ var packageVersion = "54.5.22";
17
17
  var ufoExperience;
18
18
  var getExperience = function getExperience() {
19
19
  if (!ufoExperience) {
@@ -16,6 +16,7 @@ var _chevronLeft = _interopRequireDefault(require("@atlaskit/icon/core/chevron-l
16
16
  var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
17
17
  var _mediaUi = require("@atlaskit/media-ui");
18
18
  var _analyticsNext = require("@atlaskit/analytics-next");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _styleWrappers = require("./styleWrappers");
20
21
  var _utils = require("./utils");
21
22
  var _navigated = require("./analytics/events/ui/navigated");
@@ -56,7 +57,7 @@ var withIconWrapper = function withIconWrapper(Component) {
56
57
  clickHandler = _ref.clickHandler,
57
58
  testId = _ref.testId;
58
59
  return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
59
- xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
60
+ xcss: [wrapperStyles, testId === nextNavButtonId ? iconRightStyles : iconLeftStyles],
60
61
  onClick: clickHandler('mouse'),
61
62
  testId: testId
62
63
  }, /*#__PURE__*/_react.default.createElement(Component, {
@@ -130,7 +131,7 @@ var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component)
130
131
  handler: prev('keyboard'),
131
132
  eventType: 'keyup'
132
133
  }), /*#__PURE__*/_react.default.createElement(PreviousIcon, {
133
- label: "Previous",
134
+ label: (0, _platformFeatureFlags.fg)('platform_media_a11y_nav_button_labels') ? 'Previous attachment' : 'Previous',
134
135
  clickHandler: prev,
135
136
  testId: prevNavButtonId
136
137
  })) : null), /*#__PURE__*/_react.default.createElement(_styleWrappers.RightWrapper, null, isRightVisible ?
@@ -143,7 +144,7 @@ var NavigationBase = exports.NavigationBase = /*#__PURE__*/function (_Component)
143
144
  handler: next('keyboard'),
144
145
  eventType: 'keyup'
145
146
  }), /*#__PURE__*/_react.default.createElement(NextIcon, {
146
- label: "Next",
147
+ label: (0, _platformFeatureFlags.fg)('platform_media_a11y_nav_button_labels') ? 'Next attachment' : 'Next',
147
148
  clickHandler: next,
148
149
  testId: nextNavButtonId
149
150
  })) : null));
@@ -1,7 +1,7 @@
1
1
  import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
2
2
  const componentName = 'mediaViewer';
3
3
  const packageName = "@atlaskit/media-viewer";
4
- const packageVersion = "54.5.20";
4
+ const packageVersion = "54.5.22";
5
5
  export { packageName, packageVersion, componentName, componentName as component };
6
6
  export function getFileAttributes(fileState) {
7
7
  if (!fileState) {
@@ -3,7 +3,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
3
3
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
4
4
  import { fg } from '@atlaskit/platform-feature-flags';
5
5
  const packageName = "@atlaskit/media-viewer";
6
- const packageVersion = "54.5.20";
6
+ const packageVersion = "54.5.22";
7
7
  let ufoExperience;
8
8
  const getExperience = () => {
9
9
  if (!ufoExperience) {
@@ -6,6 +6,7 @@ import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
6
6
  import { hideControlsClassName } from '@atlaskit/media-ui';
7
7
  import { Shortcut } from '@atlaskit/media-ui';
8
8
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
10
11
  import { getSelectedIndex } from './utils';
11
12
  import { createNavigatedEvent } from './analytics/events/ui/navigated';
@@ -44,7 +45,7 @@ const withIconWrapper = Component => {
44
45
  clickHandler,
45
46
  testId
46
47
  }) => /*#__PURE__*/React.createElement(Pressable, {
47
- xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
48
+ xcss: [wrapperStyles, testId === nextNavButtonId ? iconRightStyles : iconLeftStyles],
48
49
  onClick: clickHandler('mouse'),
49
50
  testId: testId
50
51
  }, /*#__PURE__*/React.createElement(Component, {
@@ -107,7 +108,7 @@ export class NavigationBase extends Component {
107
108
  handler: prev('keyboard'),
108
109
  eventType: 'keyup'
109
110
  }), /*#__PURE__*/React.createElement(PreviousIcon, {
110
- label: "Previous",
111
+ label: fg('platform_media_a11y_nav_button_labels') ? 'Previous attachment' : 'Previous',
111
112
  clickHandler: prev,
112
113
  testId: prevNavButtonId
113
114
  })) : null), /*#__PURE__*/React.createElement(RightWrapper, null, isRightVisible ?
@@ -120,7 +121,7 @@ export class NavigationBase extends Component {
120
121
  handler: next('keyboard'),
121
122
  eventType: 'keyup'
122
123
  }), /*#__PURE__*/React.createElement(NextIcon, {
123
- label: "Next",
124
+ label: fg('platform_media_a11y_nav_button_labels') ? 'Next attachment' : 'Next',
124
125
  clickHandler: next,
125
126
  testId: nextNavButtonId
126
127
  })) : null));
@@ -1,7 +1,7 @@
1
1
  import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
2
2
  var componentName = 'mediaViewer';
3
3
  var packageName = "@atlaskit/media-viewer";
4
- var packageVersion = "54.5.20";
4
+ var packageVersion = "54.5.22";
5
5
  export { packageName, packageVersion, componentName, componentName as component };
6
6
  export function getFileAttributes(fileState) {
7
7
  if (!fileState) {
@@ -6,7 +6,7 @@ import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
6
6
  import { getFeatureFlagKeysAllProducts } from '@atlaskit/media-common';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
8
  var packageName = "@atlaskit/media-viewer";
9
- var packageVersion = "54.5.20";
9
+ var packageVersion = "54.5.22";
10
10
  var ufoExperience;
11
11
  var getExperience = function getExperience() {
12
12
  if (!ufoExperience) {
@@ -13,6 +13,7 @@ import ArrowRightCircleIcon from '@atlaskit/icon/core/chevron-right';
13
13
  import { hideControlsClassName } from '@atlaskit/media-ui';
14
14
  import { Shortcut } from '@atlaskit/media-ui';
15
15
  import { withAnalyticsEvents } from '@atlaskit/analytics-next';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
16
17
  import { ArrowsWrapper, RightWrapper, LeftWrapper, Arrow } from './styleWrappers';
17
18
  import { getSelectedIndex } from './utils';
18
19
  import { createNavigatedEvent } from './analytics/events/ui/navigated';
@@ -51,7 +52,7 @@ var withIconWrapper = function withIconWrapper(Component) {
51
52
  clickHandler = _ref.clickHandler,
52
53
  testId = _ref.testId;
53
54
  return /*#__PURE__*/React.createElement(Pressable, {
54
- xcss: [wrapperStyles, label === 'Next' ? iconRightStyles : iconLeftStyles],
55
+ xcss: [wrapperStyles, testId === nextNavButtonId ? iconRightStyles : iconLeftStyles],
55
56
  onClick: clickHandler('mouse'),
56
57
  testId: testId
57
58
  }, /*#__PURE__*/React.createElement(Component, {
@@ -125,7 +126,7 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
125
126
  handler: prev('keyboard'),
126
127
  eventType: 'keyup'
127
128
  }), /*#__PURE__*/React.createElement(PreviousIcon, {
128
- label: "Previous",
129
+ label: fg('platform_media_a11y_nav_button_labels') ? 'Previous attachment' : 'Previous',
129
130
  clickHandler: prev,
130
131
  testId: prevNavButtonId
131
132
  })) : null), /*#__PURE__*/React.createElement(RightWrapper, null, isRightVisible ?
@@ -138,7 +139,7 @@ export var NavigationBase = /*#__PURE__*/function (_Component) {
138
139
  handler: next('keyboard'),
139
140
  eventType: 'keyup'
140
141
  }), /*#__PURE__*/React.createElement(NextIcon, {
141
- label: "Next",
142
+ label: fg('platform_media_a11y_nav_button_labels') ? 'Next attachment' : 'Next',
142
143
  clickHandler: next,
143
144
  testId: nextNavButtonId
144
145
  })) : null));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-viewer",
3
- "version": "54.5.21",
3
+ "version": "54.5.23",
4
4
  "description": "MediaViewer is Atlassian's powerful solution for viewing files on the web. It's both powerful and extendable yet easy-to-integrate",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,7 +35,7 @@
35
35
  "@atlaskit/code": "^18.2.0",
36
36
  "@atlaskit/css": "^1.0.0",
37
37
  "@atlaskit/form": "^16.1.0",
38
- "@atlaskit/heading": "^6.2.0",
38
+ "@atlaskit/heading": "^7.0.0",
39
39
  "@atlaskit/icon": "^37.2.0",
40
40
  "@atlaskit/icon-file-type": "^8.1.0",
41
41
  "@atlaskit/icon-lab": "^7.4.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/media-document-viewer": "^1.2.0",
46
46
  "@atlaskit/media-state": "^3.1.0",
47
47
  "@atlaskit/media-svg": "^3.1.0",
48
- "@atlaskit/media-ui": "^30.10.0",
48
+ "@atlaskit/media-ui": "^30.11.0",
49
49
  "@atlaskit/platform-feature-flags": "^2.1.0",
50
50
  "@atlaskit/portal": "^6.1.0",
51
51
  "@atlaskit/primitives": "^22.2.0",
@@ -54,9 +54,9 @@
54
54
  "@atlaskit/spinner": "^20.1.0",
55
55
  "@atlaskit/textfield": "^9.1.0",
56
56
  "@atlaskit/theme": "^26.1.0",
57
- "@atlaskit/tmp-editor-statsig": "^135.2.0",
57
+ "@atlaskit/tmp-editor-statsig": "^135.6.0",
58
58
  "@atlaskit/tokens": "^16.3.0",
59
- "@atlaskit/tooltip": "^23.2.0",
59
+ "@atlaskit/tooltip": "^24.0.0",
60
60
  "@atlaskit/ufo": "^1.0.0",
61
61
  "@babel/runtime": "^7.0.0",
62
62
  "@codemirror/language": "6.10.8",
@@ -135,6 +135,9 @@
135
135
  "platform_media_a11y_suppression_fixes": {
136
136
  "type": "boolean"
137
137
  },
138
+ "platform_media_a11y_nav_button_labels": {
139
+ "type": "boolean"
140
+ },
138
141
  "platform_media_excel_lazy_load": {
139
142
  "type": "boolean"
140
143
  },