A11y: Make list type picker display tooltip on hover (#68798)

* Change ariaLabel to description

* Description fallback for aria-label

* Add ariaLabel ass fallback for description
This commit is contained in:
Tobias Skarhed
2023-05-23 17:19:10 +02:00
committed by GitHub
parent c4242b8c5e
commit e3e8a7965a
2 changed files with 8 additions and 4 deletions
@@ -55,10 +55,10 @@ export const RadioButton = React.forwardRef<HTMLInputElement, RadioButtonProps>(
id={id}
checked={active}
name={name}
aria-label={ariaLabel}
aria-label={ariaLabel || description}
ref={ref}
/>
<label className={styles.radioLabel} htmlFor={id} title={description}>
<label className={styles.radioLabel} htmlFor={id} title={description || ariaLabel}>
{children}
</label>
</>