@instructure/ui-simple-select 10.16.1 → 10.16.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
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [10.16.3](https://github.com/instructure/instructure-ui/compare/v10.16.1...v10.16.3) (2025-04-30)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **ui-time-select,ui-simple-select,ui-select:** make Select accessible for iOS VoiceOver ([b501a7b](https://github.com/instructure/instructure-ui/commit/b501a7b38bfa491298085a173a49a1baa0a19b29))
12
+
13
+
14
+
15
+
16
+
17
+ ## [10.16.2](https://github.com/instructure/instructure-ui/compare/v10.16.1...v10.16.2) (2025-04-22)
18
+
19
+ **Note:** Version bump only for package @instructure/ui-simple-select
20
+
21
+
22
+
23
+
24
+
6
25
  ## [10.16.1](https://github.com/instructure/instructure-ui/compare/v10.16.0...v10.16.1) (2025-04-22)
7
26
 
8
27
  **Note:** Version bump only for package @instructure/ui-simple-select
@@ -28,6 +28,7 @@ var _dec, _dec2, _class, _SimpleSelect;
28
28
  */
29
29
 
30
30
  import { isValidElement, Component, Children } from 'react';
31
+ import * as utils from '@instructure/ui-utils';
31
32
  import { testable } from '@instructure/ui-testable';
32
33
  import { matchComponentTypes, passthroughProps, callRenderProp, getInteraction, withDeterministicId } from '@instructure/ui-react-utils';
33
34
  import { Select } from '@instructure/ui-select';
@@ -125,6 +126,13 @@ let SimpleSelect = (_dec = withDeterministicId(), _dec2 = testable(), _dec(_clas
125
126
  }
126
127
  const option = this.getOption('id', id);
127
128
  const value = option && option.props.value;
129
+
130
+ // Focus needs to be reapplied to input
131
+ // after selecting an item to make sure VoiceOver behaves correctly on iOS
132
+ if (utils.isAndroidOrIOS()) {
133
+ this.blur();
134
+ this.focus();
135
+ }
128
136
  if (this.isControlled) {
129
137
  this.setState({
130
138
  isShowingOptions: false
@@ -163,6 +171,9 @@ let SimpleSelect = (_dec = withDeterministicId(), _dec2 = testable(), _dec(_clas
163
171
  focus() {
164
172
  this.ref && this.ref.focus();
165
173
  }
174
+ blur() {
175
+ this.ref && this.ref.blur();
176
+ }
166
177
  get focused() {
167
178
  return this.ref ? this.ref.focused : false;
168
179
  }
@@ -1,12 +1,14 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = exports.SimpleSelect = void 0;
8
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
10
  var _react = require("react");
11
+ var utils = _interopRequireWildcard(require("@instructure/ui-utils"));
10
12
  var _testable = require("@instructure/ui-testable/lib/testable.js");
11
13
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
12
14
  var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
@@ -135,6 +137,13 @@ let SimpleSelect = exports.SimpleSelect = (_dec = (0, _withDeterministicId.withD
135
137
  }
136
138
  const option = this.getOption('id', id);
137
139
  const value = option && option.props.value;
140
+
141
+ // Focus needs to be reapplied to input
142
+ // after selecting an item to make sure VoiceOver behaves correctly on iOS
143
+ if (utils.isAndroidOrIOS()) {
144
+ this.blur();
145
+ this.focus();
146
+ }
138
147
  if (this.isControlled) {
139
148
  this.setState({
140
149
  isShowingOptions: false
@@ -173,6 +182,9 @@ let SimpleSelect = exports.SimpleSelect = (_dec = (0, _withDeterministicId.withD
173
182
  focus() {
174
183
  this.ref && this.ref.focus();
175
184
  }
185
+ blur() {
186
+ this.ref && this.ref.blur();
187
+ }
176
188
  get focused() {
177
189
  return this.ref ? this.ref.focused : false;
178
190
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-simple-select",
3
- "version": "10.16.1",
3
+ "version": "10.16.3",
4
4
  "description": "A component for standard select element behavior.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,23 +24,23 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.26.0",
27
- "@instructure/console": "10.16.1",
28
- "@instructure/shared-types": "10.16.1",
29
- "@instructure/ui-form-field": "10.16.1",
30
- "@instructure/ui-position": "10.16.1",
31
- "@instructure/ui-prop-types": "10.16.1",
32
- "@instructure/ui-react-utils": "10.16.1",
33
- "@instructure/ui-select": "10.16.1",
34
- "@instructure/ui-testable": "10.16.1",
27
+ "@instructure/console": "10.16.3",
28
+ "@instructure/shared-types": "10.16.3",
29
+ "@instructure/ui-form-field": "10.16.3",
30
+ "@instructure/ui-position": "10.16.3",
31
+ "@instructure/ui-prop-types": "10.16.3",
32
+ "@instructure/ui-react-utils": "10.16.3",
33
+ "@instructure/ui-select": "10.16.3",
34
+ "@instructure/ui-testable": "10.16.3",
35
35
  "prop-types": "^15.8.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@instructure/ui-axe-check": "10.16.1",
39
- "@instructure/ui-babel-preset": "10.16.1",
40
- "@instructure/ui-color-utils": "10.16.1",
41
- "@instructure/ui-icons": "10.16.1",
42
- "@instructure/ui-test-utils": "10.16.1",
43
- "@instructure/ui-utils": "10.16.1",
38
+ "@instructure/ui-axe-check": "10.16.3",
39
+ "@instructure/ui-babel-preset": "10.16.3",
40
+ "@instructure/ui-color-utils": "10.16.3",
41
+ "@instructure/ui-icons": "10.16.3",
42
+ "@instructure/ui-test-utils": "10.16.3",
43
+ "@instructure/ui-utils": "10.16.3",
44
44
  "@testing-library/jest-dom": "^6.6.3",
45
45
  "@testing-library/react": "^16.0.1",
46
46
  "@testing-library/user-event": "^14.5.2",
@@ -24,6 +24,7 @@
24
24
 
25
25
  import { isValidElement, ComponentElement, Component, Children } from 'react'
26
26
 
27
+ import * as utils from '@instructure/ui-utils'
27
28
  import { testable } from '@instructure/ui-testable'
28
29
  import {
29
30
  matchComponentTypes,
@@ -115,6 +116,10 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
115
116
  this.ref && this.ref.focus()
116
117
  }
117
118
 
119
+ blur() {
120
+ this.ref && this.ref.blur()
121
+ }
122
+
118
123
  get focused() {
119
124
  return this.ref ? this.ref.focused : false
120
125
  }
@@ -304,6 +309,13 @@ class SimpleSelect extends Component<SimpleSelectProps, SimpleSelectState> {
304
309
  const option = this.getOption('id', id)
305
310
  const value = option && option.props.value
306
311
 
312
+ // Focus needs to be reapplied to input
313
+ // after selecting an item to make sure VoiceOver behaves correctly on iOS
314
+ if (utils.isAndroidOrIOS()) {
315
+ this.blur()
316
+ this.focus()
317
+ }
318
+
307
319
  if (this.isControlled) {
308
320
  this.setState({ isShowingOptions: false })
309
321
  } else {