add a11y hints to buttons

This commit is contained in:
Eric Bailey
2023-10-31 14:05:52 -05:00
parent 93f87f8ced
commit b84e160f92
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ export class PostsFeedModel {
this.isBlocking = error instanceof GetAuthorFeed.BlockedActorError this.isBlocking = error instanceof GetAuthorFeed.BlockedActorError
this.isBlockedBy = error instanceof GetAuthorFeed.BlockedByActorError this.isBlockedBy = error instanceof GetAuthorFeed.BlockedByActorError
this.error = cleanError(error) this.error = cleanError(error)
this.loadMoreError = cleanError(loadMoreError) // TODO this.loadMoreError = cleanError(loadMoreError)
this.cleanError = this.error ? this._cleanError(this.error) : undefined this.cleanError = this.error ? this._cleanError(this.error) : undefined
if (error) { if (error) {
this.rootStore.log.error('Posts feed request failed', error) this.rootStore.log.error('Posts feed request failed', error)
+10 -2
View File
@@ -250,7 +250,11 @@ function ErrorMessage({
<Text style={{paddingRight: 18}}> <Text style={{paddingRight: 18}}>
{feed.cleanError?.message || feed.error} {feed.cleanError?.message || feed.error}
</Text> </Text>
<Button type="default-light" onPress={onPress}> <Button
type="default-light"
onPress={onPress}
accessibilityLabel="Retry"
accessibilityHint="Retries the last action, which errored out">
Try again Try again
</Button> </Button>
</View> </View>
@@ -353,7 +357,11 @@ function FeedInnerHeader({
<Text style={{width: '100%'}}>{error.message}</Text> <Text style={{width: '100%'}}>{error.message}</Text>
{error.type === 'upstream' ? ( {error.type === 'upstream' ? (
<Button type="default-light" style={{marginTop: 12}}> <Button
type="default-light"
style={{marginTop: 12}}
accessibilityLabel="Remove from my feeds"
accessibilityHint="Un-pin and remove this feed from your home screen feeds.">
Remove from my feeds Remove from my feeds
</Button> </Button>
) : null} ) : null}