@popmenu/common-ui 0.86.0 → 0.87.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -438,6 +438,10 @@ var classNames = classnames.exports;
|
|
|
438
438
|
var iconStaticClassName = 'pop-icon';
|
|
439
439
|
var Icon = function (props) {
|
|
440
440
|
var icon = props.icon, className = props.className, restProps = __rest(props, ["icon", "className"]);
|
|
441
|
+
var hasAccessibleAttr = Boolean(restProps['aria-describedby'] || restProps['aria-label']);
|
|
442
|
+
if (!hasAccessibleAttr && restProps['aria-hidden'] === undefined) {
|
|
443
|
+
restProps['aria-hidden'] = true;
|
|
444
|
+
}
|
|
441
445
|
var classes = useIconStyles(props);
|
|
442
446
|
var isValid = true;
|
|
443
447
|
if (!icon || (typeof icon === 'function' && icon({}) === undefined)) {
|