Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[TreeItemCustom]: Screen reader announces incorrect number of child tree items

Aperta Adatta ai principianti
#14,239 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

Inizia confrontando come TreeItemCustom e TreeItem impostano aria-setsize nel codice del componente ad albero; secondo l’issue, l’elemento personalizzato assegna ai figli una dimensione del gruppo pari a 3 quando sono 2. Usa la riproduzione StackBlitz collegata con NVDA per confermare l’annuncio, quindi verifica che per i figli venga annunciato «Elemento 1 di 2» e «Elemento 2 di 2».

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug Medium Prio TOPIC P
Describe the bug

Consider the following tree with one parent node and two child nodes.

<Tree>
  <TreeItemCustom content={<div>Item 1</div>} expanded={true}>
    <TreeItemCustom content={<div>Item 1.1</div>} />
    <TreeItemCustom content={<div>Item 1.2</div>} />
  </TreeItemCustom>
</Tree>

When keyboard focus lands on "Item 1.1", my screen reader announces "Item 1 of 3". This is incorrect; it should announce "Item 1 of 2". Similarly, when keyboard focus lands on Item 1.2, the screen reader announces "Item 2 of 3", but there is no third item.

By inspecting the HTML, the issue appears to be caused by aria-setsize being set to 3 on the child elements.

This does not happen with TreeItem --- if we replace TreeItemCustom with TreeItem in the above example, the screen reader will correctly announce "Item 1 of 2" when focus is on Item 1.1.

Isolated Example

https://stackblitz.com/edit/github-c4s8wa-vbrdlqqt?file=package.json,src%2FApp.tsx,src%2Fmain.tsx,index.html

Reproduction steps
  1. Open the stackblitz example
  2. Navigate keyboard focus to Item 1.1.
  3. In NVDA (Windows), the screen reader announces: "level 2 Item 1.1 Tree Item 1 of 3".
Expected Behaviour

Instead of "Item 1 of 3", I expect "Item 1 of 2" to be announced.

Screenshots or Videos

No response

UI5 Web Components for React Version

2.1.2

UI5 Web Components Version

2.1.2

Browser

Chrome

Operating System

Windows

Additional Context

No response

Relevant log output

Organization

No response

Declaration
  • I’m not disclosing any internal or sensitive information.
Lingua principale
TypeScript
Stelle
1.8k
Fork
290
Merge medio
3g 12h
PR unite (30g)
54

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di UI5/webcomponents

Tutte le issue di UI5/webcomponents

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.