Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
554 B · 24 lines
JSX
at main
12345678910111213141516171819202122232425// These styles will make sure the component// is not visible, but will still be announced// by screen readers.//// Adding “display: none” would hide the// element from ALL users, including those// using screen-readers.const hiddenStyles = { display: 'inline-block', position: 'absolute', overflow: 'hidden', clip: 'rect(0 0 0 0)', height: 1, width: 1, margin: -1, padding: 0, border: 0,};
const VisuallyHidden = ({ children }) => { return <span style={hiddenStyles}>{children}</span>;};
export default VisuallyHidden;