mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-05-23 00:38:42 +08:00
@@ -404,6 +404,10 @@ export type StackHeaderLeftButtonProps = {
|
||||
* Whether it's possible to navigate back in stack.
|
||||
*/
|
||||
canGoBack?: boolean;
|
||||
/**
|
||||
* Accessibility label for the button for screen readers.
|
||||
*/
|
||||
accessibilityLabel?: string;
|
||||
};
|
||||
|
||||
export type StackHeaderTitleProps = {
|
||||
|
||||
@@ -29,6 +29,7 @@ export default function HeaderBackButton({
|
||||
tintColor: customTintColor,
|
||||
titleLayout,
|
||||
truncatedLabel = 'Back',
|
||||
accessibilityLabel = label && label !== 'Back' ? `${label}, back` : 'Go back',
|
||||
}: Props) {
|
||||
const { dark, colors } = useTheme();
|
||||
|
||||
@@ -153,9 +154,7 @@ export default function HeaderBackButton({
|
||||
accessible
|
||||
accessibilityRole="button"
|
||||
accessibilityComponentType="button"
|
||||
accessibilityLabel={
|
||||
label && label !== 'Back' ? `${label}, back` : 'Go back'
|
||||
}
|
||||
accessibilityLabel={accessibilityLabel}
|
||||
accessibilityTraits="button"
|
||||
testID="header-back"
|
||||
delayPressIn={0}
|
||||
|
||||
Reference in New Issue
Block a user