Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

UN-3770 [MISC] Remove noisy tooltips from the resource list table (#2230)

Chandrasekharan M6b916eac0f42
diff --git a/frontend/src/components/widgets/resource-table/ResourceTable.css b/frontend/src/components/widgets/resource-table/ResourceTable.css
index cbbe1a0af..5b0bf01dd 100644
--- a/frontend/src/components/widgets/resource-table/ResourceTable.css
+++ b/frontend/src/components/widgets/resource-table/ResourceTable.css
@@ -160,6 +160,20 @@
color: #1890ff;
}
+/* Names the action for screen readers without an aria-label, which would
+ replace the owner text the button's contents already announce. */
+.resource-table-sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip-path: inset(50%);
+ white-space: nowrap;
+ border: 0;
+}
+
/* Actions column */
.resource-table-actions {
justify-content: flex-end;
diff --git a/frontend/src/components/widgets/resource-table/ResourceTable.jsx b/frontend/src/components/widgets/resource-table/ResourceTable.jsx
index f2180f939..3b134e596 100644
--- a/frontend/src/components/widgets/resource-table/ResourceTable.jsx
+++ b/frontend/src/components/widgets/resource-table/ResourceTable.jsx
@@ -209,12 +209,6 @@ function ResourceTable({
item?.co_owners_count > 1 ? ` +${item.co_owners_count - 1}` : "";
const initials = (email || name).slice(0, 2).toUpperCase();
const swatch = colorForSeed(email || name);
- // With co-owners, name only the primary inline (+N); the tooltip lists all
- // owners so search hitting a hidden co-owner is still explainable.
- const ownerTooltip =
- Array.isArray(ownerEmails) && ownerEmails.length > 1
- ? ownerEmails.join(", ")
- : `${name}${extra}`;
const cell = (
<Space size={10} className="resource-table-owner">
@@ -228,7 +222,7 @@ function ResourceTable({
<div className="resource-table-owner-text">
<Typography.Text
className="resource-table-owner-name"
- ellipsis={{ tooltip: ownerTooltip }}
+ ellipsis={{ tooltip: `${name}${extra}` }}
>
{name}
{extra}
@@ -250,18 +244,19 @@ function ResourceTable({
return cell;
}
return (
- <Tooltip title="Manage Co-Owners">
- <button
- type="button"
- className="resource-table-owner-btn"
- onClick={(event) => {
- event.stopPropagation();
- handleCoOwner(event, item);
- }}
- >
- {cell}
- </button>
- </Tooltip>
+ <button
+ type="button"
+ className="resource-table-owner-btn"
+ onClick={(event) => {
+ event.stopPropagation();
+ handleCoOwner(event, item);
+ }}
+ >
+ {cell}
+ <span className="resource-table-sr-only">
+ Manage co-owners{item?.[titleProp] ? ` for ${item[titleProp]}` : ""}
+ </span>
+ </button>
);
};