OperationCode/front-end

View on GitHub
components/ScreenReaderOnly/ScreenReaderOnly.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { SCREEN_READER_ONLY } from 'common/constants/testIDs';

export const toggleMessages = {
  open: 'Show more',
  close: 'Hide expanded',
};

function ScreenReaderOnly({ children }: React.PropsWithChildren<unknown>) {
  return (
    <span className="sr-only" data-testid={SCREEN_READER_ONLY}>
      {children}
    </span>
  );
}

export default ScreenReaderOnly;