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

Fixes #1094
This commit is contained in:
Eric Liu 2022-02-12 15:08:28 -08:00
commit a6fefec954

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,
};