How to use the @patternfly/patternfly/utilities/Accessibility/accessibility.css.screenReader function in @patternfly/patternfly

To help you get started, we’ve selected a few @patternfly/patternfly examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Modal / ModalBoxHeader.js View on Github external
const ModalBoxHeader = ({ hideTitle, children, className, ...props }) => {
  const hidden = hideTitle ? css(accessibleStyles.screenReader) : '';

  return 
    <title size="2xl">
      {children}
    </title>
  ;
};
github patternfly / patternfly-react / packages / patternfly-4 / react-core / src / components / Alert / Alert.js View on Github external
const Alert = ({
  variant,
  variantLabel,
  'aria-label': ariaLabel = getDefaultAriaLabel(variant),
  action,
  title,
  children,
  className,
  ...props
}) =&gt; {
  variantLabel = variantLabel || capitalize(AlertVariant[variant]);
  const readerTitle = (
    
      <span>{`${variantLabel} alert:`}</span>
      {title}
    
  );

  const customClassName = css(styles.alert, getModifier(styles, variant, styles.modifiers.info), className);

  return (
    <div aria-label="{ariaLabel}">
      
      <h4>{readerTitle}</h4>
      {children &amp;&amp; (
        <div>
          <p>{children}</p>
        </div>
      )}
      {action &amp;&amp; (</div>