Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding aria-label alias for accessibilityLabel #34502

Closed
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
83240e1
feat: adding alias for aria-label button
Viraj-10 Aug 26, 2022
b5746c5
feat: added example in rn tester and requested changes
Viraj-10 Aug 29, 2022
07c1352
feat: added aria-label alias in view
Viraj-10 Aug 29, 2022
a5411be
feat: added aria-label alias in pressable
Viraj-10 Aug 29, 2022
0f461e9
fix: spelling correction
Viraj-10 Aug 29, 2022
b2b898f
feat: added aria-label alias in text
Viraj-10 Aug 30, 2022
cb5c26d
fix: resolving merge conflict
Viraj-10 Aug 30, 2022
615d15a
fix: alphabetic order in props
Viraj-10 Aug 30, 2022
3d2fc23
feat: adding alias for aria-label button
Viraj-10 Aug 26, 2022
6cbda08
feat: added example in rn tester and requested changes
Viraj-10 Aug 29, 2022
b5604c0
rebase to react-native main
Viraj-10 Aug 30, 2022
53083cd
feat: added aria-label alias in pressable
Viraj-10 Aug 29, 2022
103e757
fix: spelling correction
Viraj-10 Aug 29, 2022
9c37a35
feat: added aria-label alias in text
Viraj-10 Aug 30, 2022
a646397
fix: alphabetic order in props
Viraj-10 Aug 30, 2022
bc54692
fix: merge conflict
Viraj-10 Aug 30, 2022
b6f0885
feat: adding alias for aria-label button
Viraj-10 Aug 26, 2022
56d844d
feat: added example in rn tester and requested changes
Viraj-10 Aug 29, 2022
4e1ade3
rebase to react-native main
Viraj-10 Aug 30, 2022
36ae9a9
feat: added aria-label alias in pressable
Viraj-10 Aug 29, 2022
40c4728
fix: spelling correction
Viraj-10 Aug 29, 2022
f41647d
feat: added aria-label alias in text
Viraj-10 Aug 30, 2022
5a68f08
fix: alphabetic order in props
Viraj-10 Aug 30, 2022
8c566ec
feat: added aria-label alias in view
Viraj-10 Aug 29, 2022
814194d
feat: added aria-label alias in pressable
Viraj-10 Aug 29, 2022
6395736
fix: spelling correction
Viraj-10 Aug 29, 2022
a24cd63
feat: added aria-label alias in text
Viraj-10 Aug 30, 2022
cef1874
fix: alphabetic order in props
Viraj-10 Aug 30, 2022
f3a8676
fix: test case for button props
Viraj-10 Aug 30, 2022
4df0835
rebase merge conflict
Viraj-10 Aug 31, 2022
2d39c55
Merge remote-tracking branch 'upstream/main' into feat/adding-aria-la…
Viraj-10 Sep 5, 2022
006a947
fix: removing duplicates
Viraj-10 Sep 5, 2022
ffeb392
feat: added aria-label alias in touchable
Viraj-10 Sep 5, 2022
1365d70
feat: added aria-label alias in image
Viraj-10 Sep 5, 2022
24f97c1
fix: merge conflict
Viraj-10 Sep 5, 2022
8b835f7
fix: test cases for ios
Viraj-10 Sep 5, 2022
81df035
fix: flow test fix
Viraj-10 Sep 5, 2022
0169fef
fix: spelling and types button and view
Viraj-10 Sep 7, 2022
5090026
rebase merge conflict
Viraj-10 Sep 8, 2022
99b2877
Merge remote-tracking branch 'upstream/main' into feat/adding-aria-la…
Viraj-10 Sep 8, 2022
3179b66
fix: test case pressable
Viraj-10 Sep 8, 2022
0dd6772
Merge remote-tracking branch 'upstream/main' into feat/adding-aria-la…
Viraj-10 Sep 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: resolving merge conflict
  • Loading branch information
Viraj-10 committed Aug 30, 2022
commit cb5c26dfdebcfcda0ad25c6128a09521957a0f39
35 changes: 23 additions & 12 deletions Libraries/Components/View/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,29 @@ export type Props = ViewProps;
const View: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof ViewNativeComponent>,
> = React.forwardRef((props: ViewProps, forwardedRef) => {
const {accessibilityLabel, 'aria-label': ariaLabel, ...restProps} = props;
return (
<TextAncestor.Provider value={false}>
<ViewNativeComponent
accessibilityLabel={ariaLabel ?? accessibilityLabel}
{...restProps}
ref={forwardedRef}
/>
</TextAncestor.Provider>
);
});
> = React.forwardRef(
(
{
tabIndex,
focusable,
accessibilityLabel,
'aria-label': ariaLabel,
...otherProps
}: ViewProps,
forwardedRef,
) => {
return (
<TextAncestor.Provider value={false}>
<ViewNativeComponent
focusable={tabIndex !== undefined ? !tabIndex : focusable}
accessibilityLabel={ariaLabel ?? accessibilityLabel}
{...otherProps}
ref={forwardedRef}
/>
</TextAncestor.Provider>
);
},
);

View.displayName = 'View';

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.