Skip to content

Commit

Permalink
Update docs to use URL links for cross plugin docs (#233)
Browse files Browse the repository at this point in the history
* Update animation docs guidelines to url links

* Update extra docs guidelines to url links

* Update forms docs guidelines links to url links

* Update react-native docs guidelines links to url links

* Update fundamental docs guidelines links to url links
  • Loading branch information
JDMathew authored Aug 9, 2024
1 parent 0d16988 commit ba9a1a5
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 34 deletions.
2 changes: 1 addition & 1 deletion packages/animations/docs/components/AnimatedContainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ The container style

## Related guidelines

- [Animations](../guidelines/animations)
- [Animations](/guidelines/animations)
2 changes: 1 addition & 1 deletion packages/animations/docs/hooks/useAnimation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,4 @@ The result is:

## Related guidelines

- [Animations](../guidelines/animations)
- [Animations](/guidelines/animations)
3 changes: 1 addition & 2 deletions packages/animations/docs/hooks/useAnimationDuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

When passing a motion property, returns 0 if [Reduce Motion](../hooks/useAMAContext#isreducemotionenabled) is enabled otherwise the given value.


## Usage

```js
Expand Down Expand Up @@ -52,4 +51,4 @@ Because we specified `translateX` as the property we're going to use for the ani

## Related guidelines

- [Animations](../guidelines/animations)
- [Animations](/guidelines/animations)
2 changes: 1 addition & 1 deletion packages/animations/docs/hooks/useReanimatedTiming.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,4 @@ value.value = withSpring('translateX', Math.random());

## Related guidelines

- [Animations](../guidelines/animations)
- [Animations](/guidelines/animations)
16 changes: 8 additions & 8 deletions packages/extras/docs/BottomSheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ const Component = () => (
## Accessibility
- Checks that the `closeActionAccessibilityLabel` is a valid [accessibilityLabel](./guidelines/accessibility-label)
- Provides a way [to close the bottom sheet](../guidelines/bottomsheet#2-can-be-dismissed) when the user taps on the overlay
- Checks that the `closeActionAccessibilityLabel` is a valid [accessibilityLabel](/guidelines/accessibility-label)
- Provides a way [to close the bottom sheet](/guidelines/bottomsheet#2-can-be-dismissed) when the user taps on the overlay
- Makes sure that the overlay is announced as "button"
- Uses slide-in and slide-out animation **only** if the [Reduce Motion] (https://reactnative.dev/docs/accessibilityinfo) preference is turned off
- Prevents the focus from [escaping the bottom sheet](../guidelines/bottomsheet#3-the-focus-stays-inside-it)
- Provides a draggable area respecting the [minimum size](../guidelines/minimum-size)
- Prevents the focus from [escaping the bottom sheet](/guidelines/bottomsheet#3-the-focus-stays-inside-it)
- Provides a draggable area respecting the [minimum size](/guidelines/minimum-size)
## Props
Expand All @@ -63,7 +63,7 @@ The duration in milliseconds before auto-closing the bottom sheet
:::tip
The auto-close will respect the user [Timed action](./guidelines/timed-actions) preference.
The auto-close will respect the user [Timed action](/guidelines/timed-actions) preference.
:::
Expand Down Expand Up @@ -193,7 +193,7 @@ If true, `children` of `BottomSheet` are wrapped in a [`<ScrollView />`](https:/
| Type | Default |
| ------- | ------- |
| boolean | true |
| boolean | true |
### `scrollViewProps`
Expand Down Expand Up @@ -266,5 +266,5 @@ import 'react-native-gesture-handler';

## Related guidelines

- [BottomSheet](../guidelines/bottomsheet)
- [Focus](../guidelines/focus)
- [BottomSheet](/guidelines/bottomsheet)
- [Focus](/guidelines/focus)
2 changes: 1 addition & 1 deletion packages/forms/docs/Form.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,4 @@ This method lets you manually shift the focus to any field controlled by the for

## Related guidelines

- [Forms](../guidelines/forms)
- [Forms](/guidelines/forms)
2 changes: 1 addition & 1 deletion packages/forms/docs/FormField.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@ Form Fields are wrapped inside an accessible\* view by default, to disable this
## Related guidelines

- [Forms](../guidelines/forms)
- [Forms](/guidelines/forms)
2 changes: 1 addition & 1 deletion packages/forms/docs/FormSubmit.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ This parameter is passed to the accessibilityState busy.

## Related guidelines

- [Forms](../guidelines/forms)
- [Forms](/guidelines/forms)
2 changes: 1 addition & 1 deletion packages/forms/docs/useFormField.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ button.

## Related guidelines

- [Forms](../guidelines/forms)
- [Forms](/guidelines/forms)
4 changes: 2 additions & 2 deletions packages/forms/docs/useTextInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ This property is used to know if the input can display an error, in case of fail

- Set the error, in case of failure, as part of the accessibilityHint

Here can be find more information about [error handling in Forms](../guidelines/forms#errors)
Here can be find more information about [error handling in Forms](/guidelines/forms#errors)

| Type | Default |
| ------- | --------- |
Expand Down Expand Up @@ -169,4 +169,4 @@ The required message to be announced by the screen reader as part of the accessi

## Related guidelines

- [Forms](../guidelines/forms)
- [Forms](/guidelines/forms)
6 changes: 3 additions & 3 deletions packages/react-native/docs/Text.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ When `autofocus` is set to true, AMA forces the `accessibilityRole` to **header*

## Related guidelines

- [Headers](../guidelines/headers)
- [Accessibility Label](../guidelines/accessibility-label)
- [Minimum Size](../guidelines/minimum-size)
- [Headers](/guidelines/headers)
- [Accessibility Label](/guidelines/accessibility-label)
- [Minimum Size](/guidelines/minimum-size)
8 changes: 4 additions & 4 deletions packages/react-native/docs/TouchableOpacity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const Test = () => {

## Related guidelines

- [Accessibility Label](../guidelines/accessibility-label)
- [Accessibility Role](../guidelines/accessibility-role)
- [Contrast](../guidelines/contrast)
- [Minimum Size](../guidelines/minimum-size)
- [Accessibility Label](/guidelines/accessibility-label)
- [Accessibility Role](/guidelines/accessibility-role)
- [Contrast](/guidelines/contrast)
- [Minimum Size](/guidelines/minimum-size)
6 changes: 3 additions & 3 deletions website/docs/ama/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ const App = () => {

## Example

In the following Example the navigation animation are disabled when the user enables the [Reduce Motion](../guidelines/animations) setting.
In the following Example the navigation animation are disabled when the user enables the [Reduce Motion](/guidelines/animations) setting.

It also shows how to build a more accessible [form](../guidelines/forms) using the built-in components.
It also shows how to build a more accessible [form](/guidelines/forms) using the built-in components.

```jsx
import * as React from 'react';
Expand Down Expand Up @@ -156,7 +156,7 @@ export const HomeScreen = () => {
<Pressable
onPress={handleOnSubmit}
accessibilityLabel="Submit"
accessibiltiyRole="button"
accessibilityRole="button"
>
<Text>Submit</Text>
</Pressable>
Expand Down
5 changes: 2 additions & 3 deletions website/guidelines/accessibility-label.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ This is especially crucial for icon-only buttons, where the control lacks textua
<Pressable
onPress={contactUs}
accessibilityRole="button"
accessibilityLabel="Contact us"
>
accessibilityLabel="Contact us">
Contact us
</Pressable>
```
Expand Down Expand Up @@ -158,7 +157,7 @@ This is used when a component has the `accessibilityLabel` prop in all caps.

:::tip

Is it possible to specify a list of allowed all caps accessibility labels, [more info here](../guidelines/guidelines.md)
Is it possible to specify a list of allowed all caps accessibility labels, [more info here](/guidelines/guidelines.md)
:::

## Related AMA components
Expand Down
2 changes: 1 addition & 1 deletion website/guidelines/pour.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ We must ensure the app is compatible with assistive technologies, including keyb
- The app should be fully functional through keyboard inputs
- [Users should be given ample time to complete tasks](/guidelines/timed-actions)
- [The app should be designed in a way that minimizes the risk of triggering seizures or other involuntary reactions](/guidelines/animations)
- [Focus order](../guidelines/focus), screen titles, [headings](/guidelines/headings), and [labels](/guidelines/accessibility-label) should be clearly defined to facilitate easy navigation
- [Focus order](/guidelines/focus), screen titles, [headings](/guidelines/headings), and [labels](/guidelines/accessibility-label) should be clearly defined to facilitate easy navigation
- The app should offer appropriately [sized touch targets](/guidelines/minimum-size) and alternative input methods

## Understandable
Expand Down
2 changes: 1 addition & 1 deletion website/versioned_docs/version-0.7.x/introduction/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const HomeScreen = () => {
<Pressable
onPress={handleOnSubmit}
accessibilityLabel="Submit"
accessibiltiyRole="button"
accessibilityRole="button"
>
<Text>Submit</Text>
</Pressable>
Expand Down

0 comments on commit ba9a1a5

Please sign in to comment.