@instructure/ui-options 10.4.1 → 10.4.2-pr-snapshot-1730913754131
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 +11 -0
- package/es/Options/index.js +5 -2
- package/lib/Options/index.js +5 -2
- package/package.json +13 -13
- package/src/Options/index.tsx +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Options/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.4.2-pr-snapshot-1730913754131](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.4.2-pr-snapshot-1730913754131) (2024-11-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **ui-options,ui-utils:** subgroup titles in Options are not announced by TalkBack and iOS VoiceOver ([ebdf8f0](https://github.com/instructure/instructure-ui/commit/ebdf8f047cf8541723d494b16432c8248ef5fe1e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [10.4.1](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1) (2024-10-28)
|
|
7
18
|
|
|
8
19
|
|
package/es/Options/index.js
CHANGED
|
@@ -34,6 +34,7 @@ import generateComponentTheme from './theme';
|
|
|
34
34
|
import { Item } from './Item';
|
|
35
35
|
import { Separator } from './Separator';
|
|
36
36
|
import { allowedProps, propTypes } from './props';
|
|
37
|
+
import { isAndroidOrIOS } from '@instructure/ui-utils';
|
|
37
38
|
/**
|
|
38
39
|
---
|
|
39
40
|
category: components
|
|
@@ -69,8 +70,10 @@ let Options = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyles, g
|
|
|
69
70
|
styles = _this$props3.styles;
|
|
70
71
|
return jsx("span", {
|
|
71
72
|
id: this._labelId,
|
|
72
|
-
role: "presentation"
|
|
73
|
-
|
|
73
|
+
role: "presentation"
|
|
74
|
+
// because TalkBack and iOS VoiceOver don't announce sub-menu labels, aria-hidden needs to be false to achive that
|
|
75
|
+
,
|
|
76
|
+
"aria-hidden": isAndroidOrIOS() ? 'false' : 'true',
|
|
74
77
|
css: styles === null || styles === void 0 ? void 0 : styles.label
|
|
75
78
|
}, callRenderProp(renderLabel));
|
|
76
79
|
}
|
package/lib/Options/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var _theme = _interopRequireDefault(require("./theme"));
|
|
|
16
16
|
var _Item = require("./Item");
|
|
17
17
|
var _Separator = require("./Separator");
|
|
18
18
|
var _props = require("./props");
|
|
19
|
+
var _uiUtils = require("@instructure/ui-utils");
|
|
19
20
|
var _dec, _dec2, _dec3, _class, _Options;
|
|
20
21
|
/*
|
|
21
22
|
* The MIT License (MIT)
|
|
@@ -76,8 +77,10 @@ let Options = exports.Options = (_dec = (0, _uiReactUtils.withDeterministicId)()
|
|
|
76
77
|
styles = _this$props3.styles;
|
|
77
78
|
return (0, _emotion.jsx)("span", {
|
|
78
79
|
id: this._labelId,
|
|
79
|
-
role: "presentation"
|
|
80
|
-
|
|
80
|
+
role: "presentation"
|
|
81
|
+
// because TalkBack and iOS VoiceOver don't announce sub-menu labels, aria-hidden needs to be false to achive that
|
|
82
|
+
,
|
|
83
|
+
"aria-hidden": (0, _uiUtils.isAndroidOrIOS)() ? 'false' : 'true',
|
|
81
84
|
css: styles === null || styles === void 0 ? void 0 : styles.label
|
|
82
85
|
}, (0, _uiReactUtils.callRenderProp)(renderLabel));
|
|
83
86
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-options",
|
|
3
|
-
"version": "10.4.
|
|
3
|
+
"version": "10.4.2-pr-snapshot-1730913754131",
|
|
4
4
|
"description": "A view-only component for composing interactive lists and menus.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,21 +23,21 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "10.4.
|
|
27
|
-
"@instructure/ui-color-utils": "10.4.
|
|
28
|
-
"@instructure/ui-test-locator": "10.4.
|
|
29
|
-
"@instructure/ui-test-utils": "10.4.
|
|
30
|
-
"@instructure/ui-themes": "10.4.
|
|
26
|
+
"@instructure/ui-babel-preset": "10.4.2-pr-snapshot-1730913754131",
|
|
27
|
+
"@instructure/ui-color-utils": "10.4.2-pr-snapshot-1730913754131",
|
|
28
|
+
"@instructure/ui-test-locator": "10.4.2-pr-snapshot-1730913754131",
|
|
29
|
+
"@instructure/ui-test-utils": "10.4.2-pr-snapshot-1730913754131",
|
|
30
|
+
"@instructure/ui-themes": "10.4.2-pr-snapshot-1730913754131"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/runtime": "^7.25.6",
|
|
34
|
-
"@instructure/emotion": "10.4.
|
|
35
|
-
"@instructure/shared-types": "10.4.
|
|
36
|
-
"@instructure/ui-icons": "10.4.
|
|
37
|
-
"@instructure/ui-prop-types": "10.4.
|
|
38
|
-
"@instructure/ui-react-utils": "10.4.
|
|
39
|
-
"@instructure/ui-testable": "10.4.
|
|
40
|
-
"@instructure/ui-view": "10.4.
|
|
34
|
+
"@instructure/emotion": "10.4.2-pr-snapshot-1730913754131",
|
|
35
|
+
"@instructure/shared-types": "10.4.2-pr-snapshot-1730913754131",
|
|
36
|
+
"@instructure/ui-icons": "10.4.2-pr-snapshot-1730913754131",
|
|
37
|
+
"@instructure/ui-prop-types": "10.4.2-pr-snapshot-1730913754131",
|
|
38
|
+
"@instructure/ui-react-utils": "10.4.2-pr-snapshot-1730913754131",
|
|
39
|
+
"@instructure/ui-testable": "10.4.2-pr-snapshot-1730913754131",
|
|
40
|
+
"@instructure/ui-view": "10.4.2-pr-snapshot-1730913754131",
|
|
41
41
|
"prop-types": "^15.8.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/src/Options/index.tsx
CHANGED
|
@@ -48,6 +48,7 @@ import type { OptionsSeparatorProps } from './Separator/props'
|
|
|
48
48
|
|
|
49
49
|
import type { OptionsProps } from './props'
|
|
50
50
|
import { allowedProps, propTypes } from './props'
|
|
51
|
+
import { isAndroidOrIOS } from '@instructure/ui-utils'
|
|
51
52
|
|
|
52
53
|
type ItemChild = React.ComponentElement<OptionsItemProps, Item>
|
|
53
54
|
type SeparatorChild = React.ComponentElement<OptionsSeparatorProps, Separator>
|
|
@@ -108,7 +109,8 @@ class Options extends Component<OptionsProps> {
|
|
|
108
109
|
<span
|
|
109
110
|
id={this._labelId}
|
|
110
111
|
role="presentation"
|
|
111
|
-
aria-hidden
|
|
112
|
+
// because TalkBack and iOS VoiceOver don't announce sub-menu labels, aria-hidden needs to be false to achive that
|
|
113
|
+
aria-hidden={isAndroidOrIOS() ? 'false' : 'true'}
|
|
112
114
|
css={styles?.label}
|
|
113
115
|
>
|
|
114
116
|
{callRenderProp(renderLabel)}
|