Carousel: no API to specify accessible name for individual slide listitem elements
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
这个 Issue 还没有评估数据。
描述
Description
The ui5-carousel component renders each slide as role="listitem" inside a shadow DOM role="list" container. These listitem elements have no accessible name — the accessibility tree shows listitem "" (empty name) for every slide.
There is currently no API that allows callers to specify an accessible name per slide from the light DOM. The component does not propagate aria-label from slotted items to the shadow listitem wrappers, and there is no typed prop or slot mechanism for this purpose.
Steps to Reproduce
- Create a
ui5-carouselwith multiple content items - Inspect the accessibility tree in browser DevTools
- Observe that each slide wrapper has
role="listitem"with an empty accessible name ("")
Current Behavior
From CarouselTemplate.tsx:
<div
role="listitem"
aria-posinset={itemInfo.posinset}
aria-setsize={itemInfo.setsize}
tabindex={itemInfo.tabIndex}
>
<slot name={itemInfo.item._individualSlot}></slot>
</div>
The listitem has position attributes but no aria-label/aria-labelledby, and there is no mechanism for the caller to contribute a name to this shadow DOM element.
Accessibility tree:
list "Item Container"
listitem "" focusable: true ← no accessible name
[all slide content]
listitem "" focusable: true
Expected Behavior
Each listitem should have an accessible name identifying the slide. Screen readers would announce it when focus lands on a slide, giving users immediate context.
Proposed approach: if the directly slotted element has an aria-label, the Carousel copies it onto the shadow listitem:
<div
role="listitem"
aria-label={itemInfo.item.getAttribute?.("aria-label") ?? undefined}
aria-posinset={itemInfo.posinset}
aria-setsize={itemInfo.setsize}
tabindex={itemInfo.tabIndex}
>
Caller usage:
<ui5-carousel accessible-name="Needs Attention">
<div aria-label="My Team"><!-- card content --></div>
<div aria-label="Pending Approvals"><!-- card content --></div>
</ui5-carousel>
Impact
- Screen readers cannot identify which slide is focused
- Without a name on the
listitem, browse-mode screen readers fall through into slide content rather than treating the slide as a navigable unit - Users cannot build a mental model of carousel content from keyboard navigation alone
WCAG Reference
- 1.3.1 Info and Relationships —
listitemrole conveys no information about slide identity - 4.1.2 Name, Role, Value — focusable
listitemhas no accessible name
Environment
@ui5/webcomponents2.24- Browser: Chrome
- Screen reader: JAWS 2026
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 290
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 50
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
UI5/webcomponents 的其他 Issue
-
ACC author action
难度 2/5 1-3 小时 新手友好度 78/100
UI5/webcomponents#14273 · 1 条评论 ·
维护者通常 2 天内回复
-
[Button]: crash on Safari 17 due to missing ElementInternals.states guard in _setBadgeOverlayStyle可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭author action bug TOPIC B
难度 1/5 1 小时以内 新手友好度 87/100
UI5/webcomponents#14270 · 2 条评论 ·
维护者通常 2 天内回复
-
[Feature Request][Side Navigation][A11Y]: Enhance user experience navigating components tree items可能已有人在做 @TeodorTaushanov 于 8 天前认领。 未关闭bug Medium Prio TOPIC RD
难度 2/5 1-3 小时 新手友好度 72/100
UI5/webcomponents#14232 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
-
enhancement feature request TOPIC RD
难度 2/5 1-3 小时 新手友好度 68/100
UI5/webcomponents#14222 · 1 条评论 ·
维护者通常 2 天内回复
-
[SF][A11y][ui5-select] Conflicting ARIA: role="combobox" rendered with aria-roledescription="Listbox" (confuses screen-reader users)可能已有人在做 @PetyaMarkovaBogdanova 于 12 天前认领。 未关闭bug Medium Prio TOPIC P
难度 2/5 1-3 小时 新手友好度 67/100
UI5/webcomponents#14212 · 2 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 UI5/webcomponents 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 83/100
awslabs/visual-asset-management-system#1278 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
mifi/lossless-cut#3213 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100
plasma-umass/scalene#1123 ·
维护者通常 1 天内回复