From 43150c41972ab1b9ce9ee2ffa59a9584d124b525 Mon Sep 17 00:00:00 2001 From: "blake.vandercar" Date: Mon, 1 Aug 2022 14:46:29 -0600 Subject: [PATCH 1/2] fix aria-labelledby prop --- packages/core/src/components/tag/tag.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/components/tag/tag.tsx b/packages/core/src/components/tag/tag.tsx index 50c6bc2bf64..e3d88356710 100644 --- a/packages/core/src/components/tag/tag.tsx +++ b/packages/core/src/components/tag/tag.tsx @@ -147,6 +147,7 @@ export class Tag extends AbstractPureComponent2 { ...htmlProps } = this.props; const isRemovable = Utils.isFunction(onRemove); + const hasChildren = !isReactNodeEmpty(children); const tagClasses = classNames( Classes.TAG, Classes.intentClass(intent), @@ -175,14 +176,14 @@ export class Tag extends AbstractPureComponent2 { return ( - {!isReactNodeEmpty(children) && ( + {hasChildren && ( Date: Mon, 1 Aug 2022 14:49:26 -0600 Subject: [PATCH 2/2] remove aria-labelledby prop --- packages/core/src/components/tag/tag.tsx | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/packages/core/src/components/tag/tag.tsx b/packages/core/src/components/tag/tag.tsx index e3d88356710..37e649e2154 100644 --- a/packages/core/src/components/tag/tag.tsx +++ b/packages/core/src/components/tag/tag.tsx @@ -124,8 +124,6 @@ export interface ITagProps export class Tag extends AbstractPureComponent2 { public static displayName = `${DISPLAYNAME_PREFIX}.Tag`; - private tagId = Utils.uniqueId("tag"); - public render() { const { active, @@ -147,7 +145,6 @@ export class Tag extends AbstractPureComponent2 { ...htmlProps } = this.props; const isRemovable = Utils.isFunction(onRemove); - const hasChildren = !isReactNodeEmpty(children); const tagClasses = classNames( Classes.TAG, Classes.intentClass(intent), @@ -164,7 +161,7 @@ export class Tag extends AbstractPureComponent2 { const isLarge = large || tagClasses.indexOf(Classes.LARGE) >= 0; const removeButton = isRemovable ? (