[SF][A11y][ui5-select] Conflicting ARIA: role="combobox" rendered with aria-roledescription="Listbox" (confuses screen-reader users)

未关闭 适合新手
#14,212 2 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 3 天内回复

@PetyaMarkovaBogdanova 已经在做这个了。

开始于 2026年10月29日。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
67/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

从src/SelectTemplate.tsx开始,追踪_ariaRoleDescription到src/i18n/messagebundle.properties中的SELECT_ROLE_DESCRIPTION条目。检查选择组合框预期的无障碍行为,并查看针对其渲染出的ARIA属性的现有测试。控件按照其组合框角色得到一致的播报,且相关测试通过,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug Medium Prio TOPIC P
Describe the bug

We got a customer issue
The ui5-select root element renders two conflicting ARIA semantics on the same node:

  • role="combobox"
  • aria-roledescription="Listbox"

Because aria-roledescription overrides how assistive technology announces the
element's role, a control that is implemented and behaves as a combobox is
announced to screen-reader users as a "Listbox". This is contradictory and
creates confusion about how to interact with the control (a listbox and a
combobox have different interaction models and keyboard expectations).

A consuming application cannot correct this: the ARIA is set inside the
component's shadow DOM, and ui5-select exposes no public property to override
role or aria-roledescription (only accessibleName, accessibleNameRef,
accessibleDescription, accessibleDescriptionRef).

Source (confirmed in v2.28.1)

src/SelectTemplate.tsx — the .ui5-select-label-root div:

<div
  class="ui5-select-label-root"
  role="combobox"
  aria-haspopup="listbox"
  aria-roledescription={this._ariaRoleDescription}   // <-- resolves to "Listbox"
  aria-expanded={this._isPickerOpen}
  ...
>

_ariaRoleDescription resolves to the i18n key SELECT_ROLE_DESCRIPTION, whose
value in src/i18n/messagebundle.properties is:

  SELECT_ROLE_DESCRIPTION=Listbox

So the final DOM is role="combobox" + aria-roledescription="Listbox".

Isolated Example

No response

Reproduction steps
  1. Go to https://ui5.github.io/webcomponents-react/v2/?path=/docs/inputs-select--docs
  2. Inspect the shadow DOM .ui5-select-label-root → it has role="combobox" and aria-roledescription="Listbox".
  3. With a screen reader (JAWS/NVDA/VoiceOver), focus the control → it is announced as a "Listbox" while behaving as a combobox.
Expected Behaviour

No response

Screenshots or Videos

No response

UI5 Web Components for React Version

2.28.1

UI5 Web Components Version

2.28.1

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

Organization

No response

Declaration
  • I’m not disclosing any internal or sensitive information.
主要语言
TypeScript
星标
1.8k
派生
290
平均合并
3 天 12 小时
30 天内合并 PR
54

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

UI5/webcomponents 的其他 Issue

查看 UI5/webcomponents 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。