diff --git a/packages/babel-preset/src/index.test.ts b/packages/babel-preset/src/index.test.ts
index 18945f50..5484aec6 100644
--- a/packages/babel-preset/src/index.test.ts
+++ b/packages/babel-preset/src/index.test.ts
@@ -213,7 +213,7 @@ describe('preset', () => {
"import * as React from \\"react\\";
import Svg from \\"react-native-svg\\";
- const SvgComponent = props => ;
+ const SvgComponent = props => ;
export default SvgComponent;"
`)
diff --git a/packages/babel-preset/src/index.ts b/packages/babel-preset/src/index.ts
index 7a5b1b39..de8ec0ee 100644
--- a/packages/babel-preset/src/index.ts
+++ b/packages/babel-preset/src/index.ts
@@ -50,10 +50,15 @@ function replaceMapToValues(replaceMap: { [key: string]: string }): Value[] {
const plugin = (_: ConfigAPI, opts: Options) => {
let toRemoveAttributes = ['version']
let toAddAttributes: Attribute[] = [
- {
- name: 'role',
- value: 'img',
- },
+ opts?.native === true
+ ? {
+ name: 'accessibilityRole',
+ value: 'image',
+ }
+ : {
+ name: 'role',
+ value: 'img',
+ },
]
if (opts.svgProps) {