Skip to content

Commit 4f04f1d

Browse files
authored
docs: updated guideline links (#313)
* update links for accessibility guidelines * update form links * update contrast links * update animations links * update usage links * updated highlighting
1 parent 7482e86 commit 4f04f1d

File tree

7 files changed

+40
-45
lines changed

7 files changed

+40
-45
lines changed

website/docs/ama/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ npm install @react-native-ama/core
1212

1313
## Wrap App with Provider
1414

15-
You need to add the [AMAProvider](../components/AMAProvider) to your app as it is needed by the components, hooks, and to provide information about accessbility violations.
15+
You need to add the [AMAProvider](/core/components/AMAProvider) to your app as it is needed by the components, hooks, and to provide information about accessibility violations.
1616

1717
```jsx {1-4,8-9}
1818
import { AMAProvider } from '@react-native-ama/core';

website/guidelines/accessibility-label.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,15 @@ This is used when a component has the `accessibilityLabel` prop in all caps.
157157

158158
:::tip
159159

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

163163
## Related AMA components
164164

165-
- [ExpandablePressable](/core/components/expandablepressable)
166-
- [Pressable](/core/components/pressable)
167-
- [TouchableOpacity](/core/components/touchableopacity)
168-
- [TouchableWithoutFeedback](/core/components/TouchableWithoutFeedback)
165+
- [ExpandablePressable](/react-native/components/expandablepressable)
166+
- [Pressable](/react-native/components/pressable)
167+
- [TouchableOpacity](/react-native/components/touchableopacity)
168+
- [TouchableWithoutFeedback](/react-native/components/TouchableWithoutFeedback)
169169

170170
## External resources
171171

website/guidelines/accessibility-role.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ This rule is mandatory and cannot be turned off!
8282

8383
## Related AMA components
8484

85-
- [ExpandablePressable](/core/components/expandablepressable)
86-
- [Pressable](/core/components/pressable)
87-
- [TouchableOpacity](/core/components/touchableopacity)
88-
- [TouchableWithoutFeedback](/core/components/TouchableWithoutFeedback)
85+
- [ExpandablePressable](/react-native/components/expandablepressable)
86+
- [Pressable](/react-native/components/pressable)
87+
- [TouchableOpacity](/react-native/components/touchableopacity)
88+
- [TouchableWithoutFeedback](/react-native/components/TouchableWithoutFeedback)

website/guidelines/accessibility-states.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ const AddToCart = ({ productID }: { productID: string }) => {
4949
accessibilityLabel="Add to cart"
5050
accessibilityRole="button"
5151
ariaBusy={isAddingToCart}
52-
onPress={isAddingToCart ? undefined : onPress}
53-
>
52+
onPress={isAddingToCart ? undefined : onPress}>
5453
{isAddingToCart} ? <ActivityIndicator /> : <Text>Add to cart</Text>
5554
</Pressable>
5655
);
@@ -119,8 +118,7 @@ export const ToggleButton = ({ checked, label }: ToggleButtonProps) => {
119118
<Pressable
120119
accessibilityLabel={label}
121120
ariaChecked={checked}
122-
ariaRole="button"
123-
>
121+
ariaRole="button">
124122
{label}
125123
</Pressable>
126124
);
@@ -173,8 +171,7 @@ const AddToCart = ({ disabled }) => {
173171
<Pressable
174172
accessibilityLabel="Add to cart"
175173
accessibilityRole="button"
176-
disabled={disabled}
177-
>
174+
disabled={disabled}>
178175
Add to cart
179176
</Pressable>
180177
);
@@ -221,8 +218,7 @@ export const Content = ({ content }) => {
221218
accessibilityLabel="Show more"
222219
accessibilityRole="button"
223220
ariaExpanded={isShowingMore}
224-
onPress={() => setIsShowingMore(showMore => !showMore)}
225-
>
221+
onPress={() => setIsShowingMore(showMore => !showMore)}>
226222
{isShowingMore ? 'Show less' : 'Show more'}
227223
</Pressable>
228224
</View>
@@ -262,14 +258,13 @@ Indicates whether a selectable element is currently selected or not.
262258

263259
### Screen Reader behaviour
264260

265-
```jsx {1-5,7-19,21-99}
261+
```jsx {1-5,7-18,20-99}
266262
const OptionButton = ({ selected, label }) => {
267263
return (
268264
<Pressable
269265
accessibilityLabel={label}
270266
accessibilityRole="button"
271-
ariaSelected={selected}
272-
>
267+
ariaSelected={selected}>
273268
<Text>{label}</Text>
274269
</Pressable>
275270
);
@@ -306,10 +301,10 @@ const TestScreen = () => {
306301

307302
## Related AMA components
308303

309-
- [ExpandablePressable](/core/components/expandablepressable)
310-
- [Pressable](/core/components/pressable)
311-
- [TouchableOpacity](/core/components/touchableopacity)
312-
- [TouchableWithoutFeedback](/core/components/TouchableWithoutFeedback)
304+
- [ExpandablePressable](/react-native/components/expandablepressable)
305+
- [Pressable](/react-native/components/pressable)
306+
- [TouchableOpacity](/react-native/components/touchableopacity)
307+
- [TouchableWithoutFeedback](/react-native/components/TouchableWithoutFeedback)
313308

314309
## External references
315310

website/guidelines/animations.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ Some people might turn off animation on the device because moving content can di
2828

2929
## Related AMA components & hooks
3030

31-
- [AnimatedContainer](../components/animatedcontainer)
32-
- [BottomSheet](../components/bottomsheet)
33-
- [useAMAContext](../hooks/useAMAContext)
34-
- [useAnimation](../hooks/useAnimation)
35-
- [useAnimationDuration](../hooks/useanimationduration)
36-
- [useReanimatedTiming](../hooks/useReanimatedTiming)
31+
- [AnimatedContainer](/animations/components/animatedcontainer)
32+
- [BottomSheet](/extras/components/bottomsheet)
33+
- [useAMAContext](/core/hooks/useAMAContext)
34+
- [useAnimation](/animations/hooks/useAnimation)
35+
- [useAnimationDuration](/animations/hooks/useanimationduration)
36+
- [useReanimatedTiming](/animations/hooks/useReanimatedTiming)
3737

3838
[^1]: If removed, it would fundamentally change the information or functionality of the content, and information and functionality cannot be achieved in another way that would conform. Basic content scrolling is considered an essential function and is excluded from this requirement.

website/guidelines/contrast.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ The visual presentation of text and images of text has a contrast ratio of at le
4242

4343
AMA performs a contrast check between the component background and its children for:
4444

45-
- [ExpandablePressable](../components/expandablepressable)
46-
- [Pressable](../components/pressable)
47-
- [TouchableOpacity](../components/touchableopacity)
48-
- [TouchableWithoutFeedback](../components/TouchableWithoutFeedback)
49-
- [usePressable](/hooks/usePressable)
45+
- [ExpandablePressable](/react-native/components/expandablepressable)
46+
- [Pressable](/react-native/components/pressable)
47+
- [TouchableOpacity](/react-native/components/touchableopacity)
48+
- [TouchableWithoutFeedback](/react-native/components/TouchableWithoutFeedback)
49+
- [usePressable](/react-native/hooks/usePressable)
5050

5151
The check is performed on the component children and sub children up to a depth level of [5](./custom-log-rules.md#constants).
5252

website/guidelines/forms.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ When on TextInput, the user should be able to access the next field or submit th
107107

108108
:::tip
109109

110-
The built-in [TextInput](../components/TextInput) automatically handles the `returnKeyLabel` property and its action.
110+
The built-in [TextInput](/forms/components/TextInput) automatically handles the `returnKeyLabel` property and its action.
111111

112112
:::
113113

@@ -132,15 +132,15 @@ Alternatively, the first failed field should be autofocused if no message is ava
132132

133133
### NO_FORM_LABEL
134134

135-
This error is used when no label has been provided for the [TextInput](../components/TextInput) component.
135+
This error is used when no label has been provided for the [TextInput](/forms/components/TextInput) component.
136136

137137
### NO_FORM_ERROR
138138

139-
This error is used when no error has been provided for the [TextInput](../components/TextInput) component.
139+
This error is used when no error has been provided for the [TextInput](/forms/components/TextInput) component.
140140

141141
### NO_KEYBOARD_TRAP <MustNot />
142142

143-
This error is triggered by the [TextInput](../components/TextInput) component if the next input field does not have the focus as expected.
143+
This error is triggered by the [TextInput](/forms/components/TextInput) component if the next input field does not have the focus as expected.
144144

145145
:::note
146146

@@ -149,8 +149,8 @@ This rule cannot be turned off!
149149

150150
## Related AMA components
151151

152-
- [Form](../components/form)
153-
- [FormField](../components/formfield)
154-
- [SwitchListItem](../components/switchlistitem)
155-
- [SwitchWrapper](../components/switchwrapper)
156-
- [TextInput](../components/textinput)
152+
- [Form](/forms/components/form)
153+
- [FormField](/forms/components/formfield)
154+
- [SwitchListItem](/react-native/components/switchlistitem)
155+
- [SwitchWrapper](/react-native/components/switchwrapper)
156+
- [TextInput](/forms/components/textinput)

0 commit comments

Comments
 (0)