Skip to content

Commit 27b7fcc

Browse files
committed
Merge branch 'dev_v3' of https://github.com/pmndrs/react-three-a11y into dev_v3
2 parents 28c14b6 + 69c228e commit 27b7fcc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Now, you'll have to import the A11yAnnouncer component. We usually place it next
2525
<Canvas>
2626
{...}
2727
</Canvas>
28+
<A11yAnnouncer />
2829
```
2930

3031
This will both help us emulate focus inside the canvas and provide some text to screen readers when nescessary.
@@ -35,7 +36,6 @@ Then you wrap the 3D objects you want to make focusable like so
3536
```jsx
3637
import { A11yAnnouncer, A11y } from "@react-three/a11y"
3738

38-
<A11yDom >
3939
<Canvas>
4040
{...}
4141
<A11y>
@@ -47,7 +47,7 @@ Then you wrap the 3D objects you want to make focusable like so
4747
</A11y>
4848
{...}
4949
</Canvas>
50-
</A11yDom>
50+
<A11yAnnouncer />
5151
```
5252

5353
At this point both My3DComponent and AGroupOf3DComponent can receive focus.
@@ -67,8 +67,8 @@ import useA11y from '@react-three/a11y' then
6767

6868
const My3DComponent = (props) {
6969

70-
//call useA11yContext to get the A11yContext from the provider
71-
const a11yContext = useA11yContext();
70+
//call useA11y to get the A11yContext from the provider
71+
const a11yContext = useA11y();
7272
//now you have access to a11yContext.hover, a11yContext.focus and a11yContext.pressed
7373

7474
return (

0 commit comments

Comments
 (0)