Files
bsky-social-app/src/view/com/util/PostSandboxWarning.tsx
T
Paul Frazee bc55241c9a [APP-724] Collection of accessibility fixes (#949)
* Fix: include alt text on the web lightbox image

* a11y: Dont read the 'ALT' label

* a11y: remove a wrapper behavior from posts

This appears to have been introduced with the goal of creating meta
actions on posts, but the behavior seems counter-productive. The
accessibility inspector was unable to access individual items within
the post and therefore most content was simply skipped.

There may be a way to support the post actions without losing the
ability to access the inner elements but I couldnt find it. -prf

* a11y: apply alt tags to image wrappers so they get read

* a11y: set Link accessibilityLabel to the title if none set

* a11y: skip the SANDBOX watermark

* a11y: improve post meta to not read UI and give a useful date

* ally: improve post controls

* a11y: add labels to lightbox images on mobile

* fix types
2023-07-03 15:57:53 -05:00

36 lines
736 B
TypeScript

import React from 'react'
import {StyleSheet, View} from 'react-native'
import {Text} from './text/Text'
import {useStores} from 'state/index'
import {usePalette} from 'lib/hooks/usePalette'
export function PostSandboxWarning() {
const store = useStores()
const pal = usePalette('default')
if (store.session.isSandbox) {
return (
<View style={styles.container}>
<Text
type="title-2xl"
style={[pal.text, styles.text]}
accessible={false}>
SANDBOX
</Text>
</View>
)
}
return null
}
const styles = StyleSheet.create({
container: {
position: 'absolute',
top: 6,
right: 10,
},
text: {
fontWeight: 'bold',
opacity: 0.07,
},
})