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
6b0c632b
You need to sign in or sign up before continuing.
Commit
6b0c632b
authored
Apr 30, 2020
by
paolo.pecis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RN Hide Focus
parent
30e92aed
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
226 additions
and
31 deletions
+226
-31
App.js
HideFocus/RNHideFocus/App.js
+37
-30
package-lock.json
HideFocus/RNHideFocus/package-lock.json
+180
-0
package.json
HideFocus/RNHideFocus/package.json
+9
-1
No files found.
HideFocus/RNHideFocus/App.js
View file @
6b0c632b
import
'react-native-gesture-handler'
;
import
React
from
'react'
;
import
{
StyleSheet
,
Text
,
View
,
TouchableOpacity
,
Body
,
Header
,
Title
}
from
'react-native'
;
function
changeText
(){
console
.
log
(
"PIPPO"
);
}
...
...
@@ -15,48 +17,41 @@ export default class App extends React.Component{
hideFocus
(){
console
.
log
(
"Button clicked"
)
this
.
setState
({
accessible
:
false
,
buttonText
:
"I am no more focusable"
})
this
.
setState
({
accessible
:
false
,
buttonText
:
"
BUTTON 2:
I am no more focusable"
})
}
render
(){
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
button
}
onPress
=
{()
=>
this
.
hideFocus
()}
>
<
Text
>
press
to
hide
BUTTON
2
focus
<
/Text
>
<
/TouchableOpacity
>
<>
<
View
style
=
{
styles
.
header
}
>
<
Text
style
=
{
styles
.
headerText
}
>
RNChangeFocus
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
container
}
>
<
View
importantForAccessibility
=
{
this
.
state
.
accessible
?
"yes"
:
"no-hide-descendants"
}
accessible
=
{
this
.
state
.
accessible
}
>
<
TouchableOpacity
backgroundColor
=
""
style
=
{
styles
.
button
}
importantForAccessibility
=
{
this
.
state
.
accessible
?
"yes"
:
"no-hide-descendants"
}
accessible
=
{
this
.
state
.
accessible
}
>
<
Text
>
{
this
.
state
.
buttonText
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
button
}
onPress
=
{()
=>
this
.
hideFocus
()}
>
<
Text
>
Press
to
make
BUTTON
2
unfocusable
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
button
}
>
<
Text
>
BUTTON
1
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
importantForAccessibility
=
{
this
.
state
.
accessible
?
"yes"
:
"no-hide-descendants"
}
accessible
=
{
this
.
state
.
accessible
}
>
<
TouchableOpacity
backgroundColor
=
""
style
=
{
styles
.
button
}
importantForAccessibility
=
{
this
.
state
.
accessible
?
"yes"
:
"no-hide-descendants"
}
accessible
=
{
this
.
state
.
accessible
}
>
<
Text
>
{
this
.
state
.
buttonText
}
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
View
>
<
TouchableOpacity
style
=
{
styles
.
button
}
>
<
Text
>
BUTTON
3
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/
>
);
}
}
function
App2
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Text
>
SSSSSSSOpen
up
App
.
js
tsasddso
start
working
on
your
app
!
AAAAAAAAA
<
/Text
>
<
TouchableOpacity
style
=
{
styles
.
button
}
onPress
=
{
changeText
}
>
<
Text
>
Press
to
change
focus
to
BUTTON
3
<
/Text
>
<
/TouchableOpacity
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
...
...
@@ -70,4 +65,16 @@ const styles = StyleSheet.create({
padding
:
10
,
marginBottom
:
20
,
},
header
:
{
backgroundColor
:
'#008577'
,
paddingHorizontal
:
20
,
paddingVertical
:
20
,
marginTop
:
20
,
},
headerText
:
{
color
:
'white'
,
},
});
HideFocus/RNHideFocus/package-lock.json
View file @
6b0c632b
This diff is collapsed.
Click to expand it.
HideFocus/RNHideFocus/package.json
View file @
6b0c632b
...
...
@@ -8,11 +8,19 @@
"eject"
:
"expo eject"
},
"dependencies"
:
{
"@react-native-community/masked-view"
:
"^0.1.6"
,
"@react-navigation/native"
:
"^5.1.7"
,
"@react-navigation/stack"
:
"^5.2.14"
,
"expo"
:
"~37.0.3"
,
"react"
:
"~16.9.0"
,
"react-dom"
:
"~16.9.0"
,
"react-native"
:
"https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz"
,
"react-native-web"
:
"~0.11.7"
"react-native-gesture-handler"
:
"~1.6.0"
,
"react-native-reanimated"
:
"~1.7.0"
,
"react-native-safe-area-context"
:
"^0.7.3"
,
"react-native-screens"
:
"~2.2.0"
,
"react-native-web"
:
"~0.11.7"
,
"react-navigation-stack"
:
"^2.3.13"
},
"devDependencies"
:
{
"babel-preset-expo"
:
"~8.1.0"
,
...
...
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