Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MobileScreenReadersApi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
public_accessibility_software
MobileScreenReadersApi
Commits
9f935f00
Commit
9f935f00
authored
May 03, 2020
by
Mattia541993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement view accessible wrapper
parent
7ba1aa98
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1908 additions
and
927 deletions
+1908
-927
AccessibilityFocus.ios.js
AccessibleView/RNAccessibileView/AccessibilityFocus.ios.js
+30
-0
Podfile.lock
AccessibleView/RNAccessibileView/ios/Podfile.lock
+456
-0
project.pbxproj
...ibileView/ios/RNAccessibileView.xcodeproj/project.pbxproj
+155
-0
contents.xcworkspacedata
...ew.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+7
-0
IDEWorkspaceChecks.plist
...project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
contents.xcworkspacedata
...os/RNAccessibileView.xcworkspace/contents.xcworkspacedata
+10
-0
IDEWorkspaceChecks.plist
...ileView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+8
-0
RNAccessibilityFocus.h
...essibileView/ios/RNAccessibileView/RNAccessibilityFocus.h
+8
-0
RNAccessibilityFocus.m
...essibileView/ios/RNAccessibileView/RNAccessibilityFocus.m
+19
-0
RNTAccessibleWrapper.h
...essibileView/ios/RNAccessibileView/RNTAccessibleWrapper.h
+20
-0
RNTAccessibleWrapper.m
...essibileView/ios/RNAccessibileView/RNTAccessibleWrapper.m
+33
-0
yarn.lock
AccessibleView/RNAccessibileView/yarn.lock
+1154
-927
No files found.
AccessibleView/RNAccessibileView/AccessibilityFocus.ios.js
0 → 100644
View file @
9f935f00
/* This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. */
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
requireNativeComponent
,
ViewPropTypes
,
}
from
'react-native'
;
const
iface
=
{
name
:
'AccessibilityFocus'
,
propTypes
:
{
...
ViewPropTypes
,
// include the default view properties
},
};
const
RNAccessibilityFocus
=
requireNativeComponent
(
'RNAccessibilityFocus'
,
iface
);
const
emptyFn
=
_
=>
_
;
export
default
class
IosAccessibleWrapper
extends
React
.
Component
{
render
()
{
return
(
<
RNAccessibilityFocus
style
=
{{...
this
.
props
.
style
}}
onFocusStart
=
{(
this
.
props
.
onFocusStart
)
?
this
.
props
.
onFocusStart
:
emptyFn
}
onFocusEnd
=
{(
this
.
props
.
onFocusEnd
)
?
this
.
props
.
onFocusEnd
:
emptyFn
}
>
{
this
.
props
.
children
}
<
/RNAccessibilityFocus>
)
;
}
}
AccessibleView/RNAccessibileView/ios/Podfile.lock
0 → 100644
View file @
9f935f00
This diff is collapsed.
Click to expand it.
AccessibleView/RNAccessibileView/ios/RNAccessibileView.xcodeproj/project.pbxproj
View file @
9f935f00
This diff is collapsed.
Click to expand it.
AccessibleView/RNAccessibileView/ios/RNAccessibileView.xcodeproj/project.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
9f935f00
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"self:"
>
</FileRef>
</Workspace>
AccessibleView/RNAccessibileView/ios/RNAccessibileView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
9f935f00
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
AccessibleView/RNAccessibileView/ios/RNAccessibileView.xcworkspace/contents.xcworkspacedata
0 → 100644
View file @
9f935f00
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version =
"1.0"
>
<FileRef
location =
"group:RNAccessibileView.xcodeproj"
>
</FileRef>
<FileRef
location =
"group:Pods/Pods.xcodeproj"
>
</FileRef>
</Workspace>
AccessibleView/RNAccessibileView/ios/RNAccessibileView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
0 → 100644
View file @
9f935f00
<
?xml
v
e
rsion="
1
.
0
"
e
n
c
o
d
ing="UT
F
-
8
"?
>
<
!
D
O
C
TYP
E
plist
PU
B
LI
C
"-//
A
ppl
e
//
D
T
D
PLIST
1
.
0
//
E
N"
"http://www.
a
ppl
e
.
c
om/
D
T
D
s/Prop
e
rtyList-
1
.
0
.
d
t
d
"
>
<
plist
v
e
rsion="
1
.
0
"
>
<
d
i
c
t
>
<
k
e
y
>
IDEDidComputeMac32BitWarning
<
/k
e
y
>
<
tru
e
/
>
<
/
d
i
c
t
>
<
/plist
>
AccessibleView/RNAccessibileView/ios/RNAccessibileView/RNAccessibilityFocus.h
0 → 100644
View file @
9f935f00
/* This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. */
#import <React/RCTViewManager.h>
@interface
RNAccessibilityFocus
:
RCTViewManager
@end
AccessibleView/RNAccessibileView/ios/RNAccessibileView/RNAccessibilityFocus.m
0 → 100644
View file @
9f935f00
/* This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. */
#import "RNAccessibilityFocus.h"
#import "RNTAccessibleWrapper.h"
@implementation
RNAccessibilityFocus
RCT_EXPORT_MODULE
()
RCT_EXPORT_VIEW_PROPERTY
(
onFocusStart
,
RCTDirectEventBlock
)
RCT_EXPORT_VIEW_PROPERTY
(
onFocusEnd
,
RCTDirectEventBlock
)
-
(
UIView
*
)
view
{
RNTAccessibleWrapper
*
wrapper
=
[[
RNTAccessibleWrapper
alloc
]
init
];
return
wrapper
;
}
@end
AccessibleView/RNAccessibileView/ios/RNAccessibileView/RNTAccessibleWrapper.h
0 → 100644
View file @
9f935f00
/* This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. */
//
// RNTAccessibleImage.h
// RNAccessibilityFocus
//
#import <UIKit/UIKit.h>
#import <React/RCTComponent.h>
#import <React/RCTView.h>
NS_ASSUME_NONNULL_BEGIN
@interface
RNTAccessibleWrapper
:
RCTView
@property
(
nonatomic
,
copy
)
RCTDirectEventBlock
onFocusStart
;
@property
(
nonatomic
,
copy
)
RCTDirectEventBlock
onFocusEnd
;
@end
NS_ASSUME_NONNULL_END
AccessibleView/RNAccessibileView/ios/RNAccessibileView/RNTAccessibleWrapper.m
0 → 100644
View file @
9f935f00
/* This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. */
//
// RNTAccessibleWrapper.m
// RNAccessibilityFocus
//
#import "RNTAccessibleWrapper.h"
@implementation
RNTAccessibleWrapper
//From React parameters methods
#pragma mark - Accessibility
-
(
void
)
accessibilityElementDidBecomeFocused
{
_onFocusStart
(@{});
}
-
(
BOOL
)
isAccessibilityElement
{
return
YES
;
}
-
(
void
)
accessibilityElementDidLoseFocus
{
_onFocusEnd
(@{});
}
@end
AccessibleView/RNAccessibileView/yarn.lock
View file @
9f935f00
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment