bug: aria-expanded is ignored when used in ion-item (TalkBack)

Đang mở
#30,558 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
accessibility, frontend

Hướng nghiên cứu

Bắt đầu với các ví dụ ion-item và div đã tái hiện trong app.component.ts và app.component.html của dự án StackBlitz được liên kết. Chạy bản tái hiện trên Android khi đã bật TalkBack và so sánh cách aria-expanded được cung cấp cho từng phần tử. Được xem là hoàn thành khi ion-item khiến TalkBack thông báo trạng thái mở rộng hoặc thu gọn nhất quán với ví dụ div.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

a11y type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

In our app we have some cases where we display some collapsible information without using ion-accordion, we implement the collapse/expand ourselves. The "expand" action is done clicking an ion-item, so we added aria-expanded to it. But Google Talkback is ignoring the aria-expanded attribute (I haven't tested it with VoiceOver yet).

The same implementation using a div works fine.

Expected Behavior

Talkback should be able to detect aria-expanded, so it should read "expanded" or "collapsed".

Steps to Reproduce
  1. Open this URL in an Android device (e.g. in Chrome): https://stackblitz.com/edit/prza28ny-qihwpnvt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html
  2. Open the "Preview" panel and wait for the project to run.
  3. Enable Talkback.
  4. Select the "Content title" below "Using ion-item". Talkback will only read "Content title", it doesn't read the aria-expanded.
  5. Now select the "Content title" below "Using div". Talkback will now read "Collapsed. Content title"
Code Reproduction URL

https://stackblitz.com/edit/prza28ny-qihwpnvt?file=src%2Fapp%2Fapp.component.ts,src%2Fapp%2Fapp.component.html

Ionic Info

Ionic:

Ionic CLI : 7.2.1
Ionic Framework : @ionic/angular 8.6.4
@angular-devkit/build-angular : 20.1.0
@angular-devkit/schematics : 19.2.15
@angular/cli : 20.1.0
@ionic/angular-toolkit : 12.2.0

Cordova:

Cordova CLI : 12.0.0 ([email protected])
Cordova Platforms : android 14.0.1, ios 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, (and 16 other plugins)

Utility:

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

System:

ios-sim : 8.0.2
NodeJS : v22.17.0
npm : 10.9.2
OS : macOS Unknown
Xcode : Xcode 16.2 Build version 16C5032a

Additional Information

No response

Ngôn ngữ chính
TypeScript
Star
52.8k
Fork
13.3k
Merge trung bình
3 ngày 1 giờ
Pull request đã merge (30 ngày)
86

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ionic-team/ionic-framework

Tất cả issue của ionic-team/ionic-framework

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.