diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ca31a5..2e529d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add a plain multi selector to example app that toggles the `disabled` and `searchable` prop in all other selectors ([#28](https://github.com/rhventures/react-native-dropdown-selector/pull/28)). - Add pre-commit hooks to ensure code quality ([#53](https://github.com/rhventures/react-native-dropdown-selector/pull/53)). - Added a new string prop `theme` to allow explicit customization of `Select` and `MultiSelect` components. Options are `system`, `light`, and `dark` ([#55](https://github.com/rhventures/react-native-dropdown-selector/pull/55)). +- Added compatibility for IOS & Android's built-in screen readers ([#112]https://github.com/rhventures/react-native-dropdown-selector/pull/112). ### Changed diff --git a/src/components/MultiSelect.tsx b/src/components/MultiSelect.tsx index 712b573..7fd102c 100644 --- a/src/components/MultiSelect.tsx +++ b/src/components/MultiSelect.tsx @@ -42,8 +42,12 @@ const MultiSelect = (props: MultiSelectProperties): React.JSX.Element => { }); return ( - + 0 ? selected.length + 'items selected' : 'no selection' )}} activeOpacity={1} style={[ style.selectorBox, diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 94c0549..b4333b0 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -44,6 +44,10 @@ const Select = (props: SelectProperties): React.JSX.Element => { return ( { {props.searchable && @@ -162,7 +164,11 @@ const SelectionList = (props: ListProperties): React.JSX.Element => { ], ]} > - + {item.label} @@ -194,6 +200,9 @@ const SelectionList = (props: ListProperties): React.JSX.Element => { onPress={props.clearSelected} > + accessible = {true} + accessibilityRole='button' + accessibilityLabel='clear list' { // This is the cross "✖"