@oxyhq/bloom 0.88.0 → 0.89.0
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/lib/commonjs/accordion/Accordion.js +7 -5
- package/lib/commonjs/accordion/Accordion.js.map +1 -1
- package/lib/commonjs/button/Button.js +8 -7
- package/lib/commonjs/button/Button.js.map +1 -1
- package/lib/commonjs/checkbox/Checkbox.js +10 -5
- package/lib/commonjs/checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +10 -1
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/collapsible/Collapsible.js +5 -4
- package/lib/commonjs/collapsible/Collapsible.js.map +1 -1
- package/lib/commonjs/composition-bar/CompositionBar.js +6 -1
- package/lib/commonjs/composition-bar/CompositionBar.js.map +1 -1
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js +7 -1
- package/lib/commonjs/frosted-icon-button/FrostedIconButton.js.map +1 -1
- package/lib/commonjs/input-group/InputGroup.js +6 -4
- package/lib/commonjs/input-group/InputGroup.js.map +1 -1
- package/lib/commonjs/item/Item.js +23 -5
- package/lib/commonjs/item/Item.js.map +1 -1
- package/lib/commonjs/segmented-control/index.js +12 -5
- package/lib/commonjs/segmented-control/index.js.map +1 -1
- package/lib/commonjs/select/index.js +6 -4
- package/lib/commonjs/select/index.js.map +1 -1
- package/lib/commonjs/select/index.web.js +6 -4
- package/lib/commonjs/select/index.web.js.map +1 -1
- package/lib/commonjs/settings-list/SettingsList.js +6 -4
- package/lib/commonjs/settings-list/SettingsList.js.map +1 -1
- package/lib/commonjs/slider/Slider.js +12 -9
- package/lib/commonjs/slider/Slider.js.map +1 -1
- package/lib/commonjs/switch/Switch.js +9 -5
- package/lib/commonjs/switch/Switch.js.map +1 -1
- package/lib/commonjs/tab-bar/TabBarBase.js +6 -4
- package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -1
- package/lib/module/accordion/Accordion.js +7 -5
- package/lib/module/accordion/Accordion.js.map +1 -1
- package/lib/module/button/Button.js +8 -7
- package/lib/module/button/Button.js.map +1 -1
- package/lib/module/checkbox/Checkbox.js +10 -5
- package/lib/module/checkbox/Checkbox.js.map +1 -1
- package/lib/module/chip/Chip.js +10 -1
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/collapsible/Collapsible.js +5 -4
- package/lib/module/collapsible/Collapsible.js.map +1 -1
- package/lib/module/composition-bar/CompositionBar.js +6 -1
- package/lib/module/composition-bar/CompositionBar.js.map +1 -1
- package/lib/module/frosted-icon-button/FrostedIconButton.js +7 -1
- package/lib/module/frosted-icon-button/FrostedIconButton.js.map +1 -1
- package/lib/module/input-group/InputGroup.js +6 -4
- package/lib/module/input-group/InputGroup.js.map +1 -1
- package/lib/module/item/Item.js +23 -5
- package/lib/module/item/Item.js.map +1 -1
- package/lib/module/segmented-control/index.js +12 -5
- package/lib/module/segmented-control/index.js.map +1 -1
- package/lib/module/select/index.js +6 -4
- package/lib/module/select/index.js.map +1 -1
- package/lib/module/select/index.web.js +6 -4
- package/lib/module/select/index.web.js.map +1 -1
- package/lib/module/settings-list/SettingsList.js +6 -4
- package/lib/module/settings-list/SettingsList.js.map +1 -1
- package/lib/module/slider/Slider.js +12 -9
- package/lib/module/slider/Slider.js.map +1 -1
- package/lib/module/switch/Switch.js +9 -5
- package/lib/module/switch/Switch.js.map +1 -1
- package/lib/module/tab-bar/TabBarBase.js +6 -4
- package/lib/module/tab-bar/TabBarBase.js.map +1 -1
- package/lib/typescript/commonjs/accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/collapsible/Collapsible.d.ts.map +1 -1
- package/lib/typescript/commonjs/composition-bar/CompositionBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/frosted-icon-button/FrostedIconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/input-group/InputGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/item/Item.d.ts.map +1 -1
- package/lib/typescript/commonjs/segmented-control/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/settings-list/SettingsList.d.ts.map +1 -1
- package/lib/typescript/commonjs/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/commonjs/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -1
- package/lib/typescript/module/accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/module/button/Button.d.ts.map +1 -1
- package/lib/typescript/module/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/collapsible/Collapsible.d.ts.map +1 -1
- package/lib/typescript/module/composition-bar/CompositionBar.d.ts.map +1 -1
- package/lib/typescript/module/frosted-icon-button/FrostedIconButton.d.ts.map +1 -1
- package/lib/typescript/module/input-group/InputGroup.d.ts.map +1 -1
- package/lib/typescript/module/item/Item.d.ts.map +1 -1
- package/lib/typescript/module/segmented-control/index.d.ts.map +1 -1
- package/lib/typescript/module/select/index.d.ts.map +1 -1
- package/lib/typescript/module/select/index.web.d.ts.map +1 -1
- package/lib/typescript/module/settings-list/SettingsList.d.ts.map +1 -1
- package/lib/typescript/module/slider/Slider.d.ts.map +1 -1
- package/lib/typescript/module/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/Button.test.tsx +11 -3
- package/src/__tests__/InputGroup.test.tsx +4 -1
- package/src/__tests__/Item.test.tsx +5 -1
- package/src/__tests__/Slider.test.tsx +11 -2
- package/src/__tests__/TabBar.test.tsx +9 -1
- package/src/__tests__/TabBarNoSelection.test.tsx +3 -1
- package/src/__tests__/aria-state-web.test.tsx +466 -0
- package/src/accordion/Accordion.tsx +5 -1
- package/src/button/Button.tsx +6 -1
- package/src/checkbox/Checkbox.tsx +8 -1
- package/src/chip/Chip.tsx +8 -0
- package/src/collapsible/Collapsible.tsx +3 -1
- package/src/composition-bar/CompositionBar.tsx +4 -0
- package/src/frosted-icon-button/FrostedIconButton.tsx +5 -0
- package/src/input-group/InputGroup.tsx +4 -1
- package/src/item/Item.tsx +24 -2
- package/src/segmented-control/index.tsx +8 -1
- package/src/select/index.tsx +4 -1
- package/src/select/index.web.tsx +4 -1
- package/src/settings-list/SettingsList.tsx +4 -1
- package/src/slider/Slider.tsx +10 -2
- package/src/switch/Switch.tsx +7 -1
- package/src/tab-bar/TabBarBase.tsx +4 -1
package/src/select/index.web.tsx
CHANGED
|
@@ -324,7 +324,10 @@ export function SelectItem({ ref, value, label, children, style }: SelectItemPro
|
|
|
324
324
|
// dropped it, leaving every option a `role="radio"` with no accessible
|
|
325
325
|
// name for a screen reader to announce.
|
|
326
326
|
accessibilityLabel={label}
|
|
327
|
-
|
|
327
|
+
// `aria-checked` is the state ARIA defines for `role="radio"`, and the
|
|
328
|
+
// only one react-native-web emits — it never reads `accessibilityState`,
|
|
329
|
+
// so this fork's options announced no selection at all.
|
|
330
|
+
aria-checked={isSelected}
|
|
328
331
|
onPress={() => {
|
|
329
332
|
ctx.onValueChange?.(value);
|
|
330
333
|
ctx.close();
|
|
@@ -128,7 +128,10 @@ export const SettingsListItem = memo<SettingsListItemProps>(function SettingsLis
|
|
|
128
128
|
accessibilityRole={role}
|
|
129
129
|
accessibilityLabel={label}
|
|
130
130
|
accessibilityHint={accessibilityHint}
|
|
131
|
-
|
|
131
|
+
// See the pressable branch above, which gets `aria-disabled` for free
|
|
132
|
+
// from its `disabled` prop. A `View` has no such prop, and
|
|
133
|
+
// react-native-web never reads `accessibilityState`.
|
|
134
|
+
aria-disabled={disabled || undefined}
|
|
132
135
|
>
|
|
133
136
|
{content}
|
|
134
137
|
</View>
|
package/src/slider/Slider.tsx
CHANGED
|
@@ -198,8 +198,16 @@ const SliderComponent = function Slider({
|
|
|
198
198
|
testID={testID}
|
|
199
199
|
accessibilityRole="adjustable"
|
|
200
200
|
accessibilityLabel={accessibilityLabel}
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
// react-native-web reads the FLAT `aria-value*` props; it has no handling
|
|
202
|
+
// for the `accessibilityValue` object at all, so this rendered a
|
|
203
|
+
// `role="slider"` carrying no value whatsoever — a screen reader could
|
|
204
|
+
// say the control existed but never what it was set to. React Native
|
|
205
|
+
// folds these three back into `accessibilityValue`, and `aria-disabled`
|
|
206
|
+
// into `accessibilityState`, so native keeps what it had.
|
|
207
|
+
aria-valuemin={min}
|
|
208
|
+
aria-valuemax={max}
|
|
209
|
+
aria-valuenow={value}
|
|
210
|
+
aria-disabled={disabled || undefined}
|
|
203
211
|
style={[
|
|
204
212
|
styles.root,
|
|
205
213
|
{ height: Math.max(thumbSize, trackHeight) + 8 },
|
package/src/switch/Switch.tsx
CHANGED
|
@@ -82,7 +82,13 @@ const SwitchComponent = React.forwardRef<React.ElementRef<typeof Pressable>, Swi
|
|
|
82
82
|
ref={ref}
|
|
83
83
|
role="switch"
|
|
84
84
|
aria-checked={value}
|
|
85
|
-
|
|
85
|
+
// The disabled state has to travel on this prop, not on `aria-disabled`:
|
|
86
|
+
// react-native-web's `Pressable` appends its own `aria-disabled` from
|
|
87
|
+
// `disabled` AFTER spreading the caller's props, so a caller-supplied
|
|
88
|
+
// one is overwritten. `handlePress` already no-ops when disabled, so
|
|
89
|
+
// this only adds what was missing — the announced state, and skipping
|
|
90
|
+
// the control in the tab order.
|
|
91
|
+
disabled={disabled}
|
|
86
92
|
onPress={handlePress}
|
|
87
93
|
onPressIn={onPressIn}
|
|
88
94
|
onPressOut={onPressOut}
|
|
@@ -569,7 +569,10 @@ function TabBarButtonBody({
|
|
|
569
569
|
// Accessibility defaults come BEFORE the spread so an explicit prop — or
|
|
570
570
|
// one injected by a router trigger — still wins.
|
|
571
571
|
accessibilityRole="tab"
|
|
572
|
-
|
|
572
|
+
// `aria-selected` is the state ARIA defines for `role="tab"`, and the one
|
|
573
|
+
// spelling both platforms read: react-native-web ignores
|
|
574
|
+
// `accessibilityState`, React Native folds `aria-selected` into it.
|
|
575
|
+
aria-selected={focused}
|
|
573
576
|
accessibilityLabel={item.label}
|
|
574
577
|
{...pressableProps}
|
|
575
578
|
onPress={(event) => {
|