Bug Description
Since 2.26.0, a ui5-list containing ui5-li-custom items can throw during render ending up without height.
You can see that here in our Storybook, the MessageView renders a list with custom list items: https://ui5.github.io/webcomponents-react/v2/iframe.html?id=user-feedback-messageview--default&viewMode=story
So without a patch, the MessageView component is not usable with v2.26.0 of ui5wc/r.
AI generated analysis:
While the list renders, ariaDescriptionText → _hasInteractiveItems iterates the items and calls _hasFocusableElements() on each custom item → _getFocusableElements() → getTabbableElements(this.getFocusDomRef()). If an item hasn't finished its first render, getFocusDomRef() returns undefined, and getTabbableElements dereferences it (el.tagName) with no null-check, throwing and aborting the list render.
Affected Component
ui5-list, ui5-li-custom
Expected Behaviour
The list should render without throwing when a custom item's DOM ref isn't ready yet — getTabbableElements(undefined) should return [] (or the callers should skip items without a focus DOM ref).
Isolated Example
https://stackblitz.com/edit/github-7gvnntpw?file=index.html,main.js
Steps to Reproduce
- Open the isolated example.
- On load, an
Uncaught TypeError: Cannot read properties of undefined (reading 'tagName') is thrown (deterministic; getFocusDomRef() logs undefined).
In a real app / production build the same throw happens inside the list's own render, so the list (and components built on it) render blank.
Log Output, Stack Trace or Screenshots
TypeError: Cannot read properties of undefined (reading 'tagName')
at getTabbableElements
at ListItemCustom._getFocusableElements
at ListItemCustom._hasFocusableElements
at get _hasInteractiveItems // Array.some over getItems()
at get ariaDescriptionText
at <list render>
Priority
High
UI5 Web Components Version
2.26.0
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
No response
Organization
UI5WCR
Declaration
Bug Description
Since 2.26.0, a
ui5-listcontainingui5-li-customitems can throw during render ending up without height.You can see that here in our Storybook, the MessageView renders a list with custom list items: https://ui5.github.io/webcomponents-react/v2/iframe.html?id=user-feedback-messageview--default&viewMode=story
So without a patch, the
MessageViewcomponent is not usable with v2.26.0 of ui5wc/r.AI generated analysis:
While the list renders,
ariaDescriptionText→_hasInteractiveItemsiterates the items and calls_hasFocusableElements()on each custom item →_getFocusableElements()→getTabbableElements(this.getFocusDomRef()). If an item hasn't finished its first render,getFocusDomRef()returnsundefined, andgetTabbableElementsdereferences it (el.tagName) with no null-check, throwing and aborting the list render.Affected Component
ui5-list, ui5-li-custom
Expected Behaviour
The list should render without throwing when a custom item's DOM ref isn't ready yet —
getTabbableElements(undefined)should return[](or the callers should skip items without a focus DOM ref).Isolated Example
https://stackblitz.com/edit/github-7gvnntpw?file=index.html,main.js
Steps to Reproduce
Uncaught TypeError: Cannot read properties of undefined (reading 'tagName')is thrown (deterministic;getFocusDomRef()logsundefined).In a real app / production build the same throw happens inside the list's own render, so the list (and components built on it) render blank.
Log Output, Stack Trace or Screenshots
Priority
High
UI5 Web Components Version
2.26.0
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
No response
Organization
UI5WCR
Declaration