@atlaskit/link-picker 1.47.2 → 1.47.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,15 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.47.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#156396](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/156396)
8
+ [`0d51b154611bd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0d51b154611bd) -
9
+ Fix a11y issue with aria-controls by setting aria-expanded true only when results are shown on
10
+ input role=combobox
11
+ - Updated dependencies
12
+
3
13
  ## 1.47.2
4
14
 
5
15
  ### Patch Changes
@@ -332,7 +332,9 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
332
332
  var ariaActiveDescendant = selectedIndex > -1 ? "link-search-list-item-".concat(selectedIndex) : '';
333
333
  var a11yList = isActivePlugin || isLoadingPlugins ? {
334
334
  role: 'combobox',
335
- 'aria-expanded': true,
335
+ // When a combobox popup is not visible, the element with role combobox has aria-expanded set to false
336
+ // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded#combobox
337
+ 'aria-expanded': !!(items !== null && items !== void 0 && items.length),
336
338
  'aria-autocomplete': 'list',
337
339
  'aria-controls': linkSearchListId,
338
340
  'aria-activedescendant': ariaActiveDescendant,
@@ -363,7 +365,10 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
363
365
  testId: testIds.urlInputField,
364
366
  label: customMessages !== null && customMessages !== void 0 && customMessages.linkLabel ? intl.formatMessage(customMessages.linkLabel) : intl.formatMessage(messages.linkLabel),
365
367
  placeholder: customMessages !== null && customMessages !== void 0 && customMessages.linkPlaceholder ? intl.formatMessage(customMessages === null || customMessages === void 0 ? void 0 : customMessages.linkPlaceholder) : intl.formatMessage(messages.linkPlaceholder),
366
- value: url,
368
+ value: url
369
+ // https://hello.atlassian.net/wiki/spaces/~63466d7f8bb342276b512142/pages/3057616221/JFE+linting+recommendations#jsx-a11y%2Fno-autofocus
370
+ // eslint-disable-next-line jsx-a11y/no-autofocus
371
+ ,
367
372
  autoFocus: true,
368
373
  clearLabel: intl.formatMessage(_messages.formMessages.clearLink),
369
374
  error: invalidUrl ? intl.formatMessage(_messages.formMessages.linkInvalid) : null,
@@ -31,7 +31,7 @@ var testIds = exports.testIds = {
31
31
  };
32
32
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
33
33
  packageName: "@atlaskit/link-picker" || '',
34
- packageVersion: "1.47.2" || '',
34
+ packageVersion: "1.47.3" || '',
35
35
  componentName: _constants.COMPONENT_NAME,
36
36
  source: _constants.COMPONENT_NAME
37
37
  };
@@ -332,7 +332,9 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
332
332
  const ariaActiveDescendant = selectedIndex > -1 ? `link-search-list-item-${selectedIndex}` : '';
333
333
  const a11yList = isActivePlugin || isLoadingPlugins ? {
334
334
  role: 'combobox',
335
- 'aria-expanded': true,
335
+ // When a combobox popup is not visible, the element with role combobox has aria-expanded set to false
336
+ // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded#combobox
337
+ 'aria-expanded': !!(items !== null && items !== void 0 && items.length),
336
338
  'aria-autocomplete': 'list',
337
339
  'aria-controls': linkSearchListId,
338
340
  'aria-activedescendant': ariaActiveDescendant,
@@ -363,7 +365,10 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
363
365
  testId: testIds.urlInputField,
364
366
  label: customMessages !== null && customMessages !== void 0 && customMessages.linkLabel ? intl.formatMessage(customMessages.linkLabel) : intl.formatMessage(messages.linkLabel),
365
367
  placeholder: customMessages !== null && customMessages !== void 0 && customMessages.linkPlaceholder ? intl.formatMessage(customMessages === null || customMessages === void 0 ? void 0 : customMessages.linkPlaceholder) : intl.formatMessage(messages.linkPlaceholder),
366
- value: url,
368
+ value: url
369
+ // https://hello.atlassian.net/wiki/spaces/~63466d7f8bb342276b512142/pages/3057616221/JFE+linting+recommendations#jsx-a11y%2Fno-autofocus
370
+ // eslint-disable-next-line jsx-a11y/no-autofocus
371
+ ,
367
372
  autoFocus: true,
368
373
  clearLabel: intl.formatMessage(formMessages.clearLink),
369
374
  error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
@@ -19,7 +19,7 @@ export const testIds = {
19
19
  };
20
20
  export const PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/link-picker" || '',
22
- packageVersion: "1.47.2" || '',
22
+ packageVersion: "1.47.3" || '',
23
23
  componentName: COMPONENT_NAME,
24
24
  source: COMPONENT_NAME
25
25
  };
@@ -328,7 +328,9 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
328
328
  var ariaActiveDescendant = selectedIndex > -1 ? "link-search-list-item-".concat(selectedIndex) : '';
329
329
  var a11yList = isActivePlugin || isLoadingPlugins ? {
330
330
  role: 'combobox',
331
- 'aria-expanded': true,
331
+ // When a combobox popup is not visible, the element with role combobox has aria-expanded set to false
332
+ // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-expanded#combobox
333
+ 'aria-expanded': !!(items !== null && items !== void 0 && items.length),
332
334
  'aria-autocomplete': 'list',
333
335
  'aria-controls': linkSearchListId,
334
336
  'aria-activedescendant': ariaActiveDescendant,
@@ -359,7 +361,10 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
359
361
  testId: testIds.urlInputField,
360
362
  label: customMessages !== null && customMessages !== void 0 && customMessages.linkLabel ? intl.formatMessage(customMessages.linkLabel) : intl.formatMessage(messages.linkLabel),
361
363
  placeholder: customMessages !== null && customMessages !== void 0 && customMessages.linkPlaceholder ? intl.formatMessage(customMessages === null || customMessages === void 0 ? void 0 : customMessages.linkPlaceholder) : intl.formatMessage(messages.linkPlaceholder),
362
- value: url,
364
+ value: url
365
+ // https://hello.atlassian.net/wiki/spaces/~63466d7f8bb342276b512142/pages/3057616221/JFE+linting+recommendations#jsx-a11y%2Fno-autofocus
366
+ // eslint-disable-next-line jsx-a11y/no-autofocus
367
+ ,
363
368
  autoFocus: true,
364
369
  clearLabel: intl.formatMessage(formMessages.clearLink),
365
370
  error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
@@ -20,7 +20,7 @@ export var testIds = {
20
20
  };
21
21
  export var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/link-picker" || '',
23
- packageVersion: "1.47.2" || '',
23
+ packageVersion: "1.47.3" || '',
24
24
  componentName: COMPONENT_NAME,
25
25
  source: COMPONENT_NAME
26
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.47.2",
3
+ "version": "1.47.3",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -45,14 +45,14 @@
45
45
  "dependencies": {
46
46
  "@atlaskit/analytics-next": "^10.1.0",
47
47
  "@atlaskit/atlassian-context": "^0.0.2",
48
- "@atlaskit/button": "^20.2.0",
48
+ "@atlaskit/button": "^20.3.0",
49
49
  "@atlaskit/form": "^10.5.0",
50
50
  "@atlaskit/frontend-utilities": "^2.7.0",
51
51
  "@atlaskit/heading": "^2.4.0",
52
- "@atlaskit/icon": "^22.22.0",
52
+ "@atlaskit/icon": "^22.24.0",
53
53
  "@atlaskit/intl-messages-provider": "^1.0.2",
54
54
  "@atlaskit/linking-common": "^6.0.0",
55
- "@atlaskit/onboarding": "^11.15.0",
55
+ "@atlaskit/onboarding": "^11.16.0",
56
56
  "@atlaskit/platform-feature-flags": "^0.3.0",
57
57
  "@atlaskit/primitives": "^12.2.0",
58
58
  "@atlaskit/spinner": "^16.3.0",
@@ -79,7 +79,7 @@
79
79
  "@af/analytics-codegen": "^0.1.0",
80
80
  "@af/integration-testing": "*",
81
81
  "@af/visual-regression": "*",
82
- "@atlaskit/dropdown-menu": "^12.20.0",
82
+ "@atlaskit/dropdown-menu": "^12.21.0",
83
83
  "@atlaskit/link-provider": "^1.16.0",
84
84
  "@atlaskit/link-test-helpers": "^7.5.0",
85
85
  "@atlaskit/visual-regression": "*",