fix(tooltip): aria-label should use iconDescription if triggerText is falsy (#1095)

This commit is contained in:
metonym 2022-02-12 15:43:58 -08:00 committed by GitHub
commit c32df50689
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,7 @@
"aria-expanded": open,
"aria-describedby": open ? tooltipId : undefined,
"aria-labelledby": triggerText ? triggerId : undefined,
"aria-label": triggerText ? iconDescription : undefined,
"aria-label": triggerText ? undefined : iconDescription,
tabindex,
style: hideIcon ? $$restProps.style : undefined,
};