[ui5-side-navigation-item]: expandable items with children cannot use `href` because the expand/collapse chevron is a child of the link anchor
Maintainer thường phản hồi trong vòng 2 ngày
@LidiyaGeorgieva đang làm issue này rồi.
Từ ngày 29/10/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 74/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, web-dev
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Start with packages/fiori/src/SideNavigationItemTemplate.tsx to trace how the anchor and toggle icon are rendered, then read the toggle handler in packages/fiori/src/SideNavigationItem.ts. Check the component’s existing tests for expandable items and href behavior. Done when the link retains native navigation semantics while the chevron independently toggles expansion.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
When a ui5-side-navigation-item is expandable (has ui5-side-navigation-sub-item children) and an href is set, the native link and the expand/collapse chevron conflict, because the chevron toggle icon is rendered inside the anchor element rather than as a sibling.
In packages/fiori/src/SideNavigationItemTemplate.tsx the item renders roughly as:
<EffectiveTag ... href={this._href} ...>
<Icon .../> {/* leading icon */}
<div class="ui5-sn-item-text">...</div> {/* label */}
<Icon
class="ui5-sn-item-toggle-icon"
onClick={this._onToggleClick} {/* expand/collapse */}
.../>
<Icon class="ui5-sn-item-external-link-icon" .../>
</EffectiveTag>
Because the chevron lives inside the <a href>:
- A click on the chevron is also a click on the link. _onToggleClick must stopPropagation() and rely on preventDefault plumbing to stop the anchor from navigating.
- Native browser link behavior (middle-click, context menu "Open in new tab", "Copy link address") now also applies to the chevron area, which is irritating.
- Consumers are effectively forced to omit href on expandable/parent items and re-implement navigation in JS to avoid the conflict which means those items lose the native link context menu entirely.
Affected Component
ui5-side-navigation-item (also ui5-side-navigation-sub-item) — package @ui5/webcomponents-fiori
Expected Behaviour
An expandable ui5-side-navigation-item should be able to carry a real href and support expand/collapse without the two interfering:
- The chevron/toggle is a separate interactive sibling of the link anchor (its own button/role), not a descendant of the
<a>. - The link part keeps native link semantics (new tab via modifier/middle-click, context menu, "copy link address").
- The chevron toggles expansion independently, without requiring stopPropagation/preventDefault handling on the consumer side.
Isolated Example
No response
Steps to Reproduce
- Render a ui5-side-navigation-item with href set and one or more ui5-side-navigation-sub-item children.
- Right-click the item; the chevron area is part of the link, so the browser's link context menu covers the toggle too.
- Drive navigation purely via href: clicking the chevron also activates the link, so expand/collapse and navigation collide.
Log Output, Stack Trace or Screenshots
No response
Priority
Medium
UI5 Web Components Version
2.27.2
Browser
Chrome, Edge, Firefox, Safari
Operating System
No response
Additional Context
href/target support was added in PR #7682. This report is about making it usable on expandable items by separating the chevron from the anchor. The component already has a dedicated toggle handler (_onToggleClick / _toggle() in packages/fiori/src/SideNavigationItem.ts), so the chevron could be moved onto a standalone button sibling of the link with limited change to the handler logic.
Related: #11447 (stopPropagation/preventDefault on item click) and #10603 (click-detail modifiers) are symptoms of the same single-anchor-wraps-everything structure.
Organization
No response
Declaration
- I’m not disclosing any internal or sensitive information.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.8k
- Fork
- 289
- Merge trung bình
- 4 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 33
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của UI5/webcomponents
-
[Bug] ui5-input: shadow DOM icon wrapper divs appear as "Blank" in screen reader browse modeĐang mởbug Medium Prio TOPIC RL
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
UI5/webcomponents#14310 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[ui5-li | ui5-list]: inner RadioButton announces 'Item Selection.' instead of option label in single-select mode (WCAG 4.1.2)Có thể đã có người làm @PetyaMarkovaBogdanova đã nhận 19 ngày trước. Đang mởACC bug Medium Prio TOPIC P
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
UI5/webcomponents#14273 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[SF][A11y][ui5-select] Conflicting ARIA: role="combobox" rendered with aria-roledescription="Listbox" (confuses screen-reader users)Có thể làm lại được @PetyaMarkovaBogdanova đã nhận 33 ngày trước và không có pull request nào đang mở. Đang mởbug Medium Prio TOPIC P
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
UI5/webcomponents#14212 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
(ui5-search): Loading state sample is brokenCó thể đã có người làm @ndeshev đã nhận 33 ngày trước. Đang mởbug Low Prio released TOPIC RL
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
UI5/webcomponents#14210 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
For IllustratedMessage title there should be support for setting Header levelCó thể làm lại được @plamenivanov91 đã nhận 33 ngày trước và không có pull request nào đang mở. Đang mởenhancement Medium Prio TOPIC P
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
UI5/webcomponents#14162 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của UI5/webcomponents
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
can1357/oh-my-pi#21349 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày
-
[aw] CARE PR Reviewer: timed outĐang mởagentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ohcnetwork/care_fe#17474 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100