[AnalyticalTable]: useF2CellEdit inserts "undefined" into grid-cell aria-label

オープン 初心者向け
#9,171 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Lukas742 がすでに取り組んでいます。

2026年11月26日 から。

  • #9173 @Lukas742 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

問題のラベルは packages/main/src/components/AnalyticalTable/pluginHooks/useF2CellEdit.ts の82行目付近で組み立てられており、そこではセルの aria-label が、欠落しうるラベルから連結されています。まずそこから始めて、cellLabel コールバックが渡されていない場合にラベルのテキストがどこから来るのかをたどってください。明示的なラベルがないセルの aria-label に文字通りの "undefined" が含まれなくなり、F2 によるセル編集に関する既存の AnalyticalTable テストがすべて通れば完了です。

索引モデルが issue の本文から書いたものです。

説明

SAP SF
Describe the bug

When AnalyticalTable uses useF2CellEdit with a custom link cell and no explicit cellLabel, the hook generates:
aria-label="Includes Link undefined"
The cell contains a valid, populated link title. The literal undefined comes from concatenating a missing aria-label, rather than missing application data.
This can produce an incorrect screen-reader announcement and obscure the actual cell content.

https://github.com/UI5/webcomponents-react/blob/5ee63707e54ff08a930845f2ca8c9c5e8cad3866/packages/main/src/components/AnalyticalTable/pluginHooks/useF2CellEdit.ts#L82

Isolated Example

No response

Reproduction steps
import {
  AnalyticalTable,
  AnalyticalTableHooks,
  Link,
  ThemeProvider
} from "@ui5/webcomponents-react";
import type {
  AnalyticalTableCellInstance,
  AnalyticalTableColumnDefinition
} from "@ui5/webcomponents-react";

const { useF2CellEdit } = AnalyticalTableHooks;

function TitleCell(props: AnalyticalTableCellInstance) {
  const ref = useF2CellEdit.useCallbackRef(props);

  return (
    <Link href="#review" ref={ref}>
      {props.value}
    </Link>
  );
}

const columns: AnalyticalTableColumnDefinition[] = [
  {
    id: "title",
    Header: "Title",
    accessor: "title",
    Cell: TitleCell,
    interactiveElementName: "Link"
  }
];

export default function App() {
  return (
    <ThemeProvider>
      <AnalyticalTable
        columns={columns}
        data={[{ title: "Annual Review" }]}
        tableHooks={[useF2CellEdit]}
      />
    </ThemeProvider>
  );
}

  1. Render the table above without a cellLabel callback.
  2. Inspect the first body cell with role="gridcell".
  3. Observe aria-label="Includes Link undefined".
Expected Behaviour

Missing optional labels should not become the literal string undefined.

Screenshots or Videos

No response

UI5 Web Components for React Version

2.28.2

UI5 Web Components Version

2.28.1

Browser

Edge

Operating System

No response

Additional Context

No response

Relevant log output

Organization

SF

Declaration
  • I’m not disclosing any internal or sensitive information.
主要言語
TypeScript
スター
544
フォーク
113
平均マージ
1日 16時間
マージ済み PR(30日)
34

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

UI5/webcomponents-react のほかの issue

UI5/webcomponents-react の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。