ionic-team / ionic-team/ionic-framework

bug: ion-select (interface="modal") renders invalid ARIA structure: ion-list role conflicts with ion-radio-group

未关闭
#31,074 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
type: bug
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

In ion-select-modal, the DOM structure includes:
- ion-content
- ion-list with role="list" automatically applied by Ionic
- Inside it, ion-radio-group with role="radiogroup"
- A list of ion-items representing the options each containing an with group "radio"

This produces an invalid semantic hierarchy because enforces a list container semantics, it must contain elements with role "listitem"

### Expected Behavior

## Option A (preferred)

Remove the ion-list wrapper entirely when rendering ion-radio-group, allowing the following hyerarchy inside
- ion-radio-group (role="radiogroup")
- ion-radio (role="radio")
## Option B

If ion-list is required for styling/layout purposes, it must not impose role="list" semantics, or:
Each radio should be wrapped in a container element with role="listitem"
Ensuring valid nesting:
role="list"
- role="listitem"
- role="radiogroup"
- role="radio"

### Steps to Reproduce

- Create an ion-select with interface="modal"
- Provide multiple ion-select-option values
- Open the select modal
- Inspect DOM structure inside ion-select-modal, or analyze with accessibility tools

Observe:
ion-list wrapping the ion-radio-group
role="list" applied to the container

### Code Reproduction URL

https://ionicframework.com/docs/api/select#modal

### Ionic Info

Ionic:

Ionic CLI : 7.2.0
Ionic Framework : @ionic/angular 8.8.2
@angular-devkit/build-angular : 18.2.14
@angular-devkit/schematics : 18.2.14
@angular/cli : 18.2.14
@ionic/angular-toolkit : 11.0.1

Capacitor:

Capacitor CLI : 7.4.3
@capacitor/android : 7.4.3
@capacitor/core : 7.4.3
@capacitor/ios : 7.4.3

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v22.15.0 (C:\NVMNodeLink\nodejs\node.exe)
npm : 11.7.0
OS : Windows 10

### Additional Information

Accessibility issue was highlighted by the use of axe DevTools

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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