Fluent UI DocumentCardTitle global html attributes

38 Views Asked by At

Looking to add an id (a global attribute on HTML elements) to the DocumentCardTitle component to use for adding accessibility attributes such as aria-describedby

Something like this.

      <DocumentCardDetails className={styles.details}>
        <DocumentCardTitle
          className={styles.title}
          title={localizedTitle}
          id="action-desc"
        />
        <DocumentCardTitle
          title={localizedDescription}
          className={styles.description}
          showAsSecondaryTitle
        />
        <ActionButton
          aria-describedby="action-desc"
          onClick={(e: React.MouseEvent<HTMLButtonElement>) =>
            handleClick(e, props.item)
          }
          className={styles.button}
          text={callToActionLabel}
        />
      </DocumentCardDetails>

Error Error message thrown

Is there a way to add this id or an alternative solution to adding accessibility properties?

0

There are 0 best solutions below