feat: ion-accordion - allow a heading element around the header item (WAI-ARIA accordion pattern)
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
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- angular, html, typescript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Start by reading the ion-accordion header slot handling and ion-item role behavior; the issue provides a reproduction in src/app/repros/accordion.page.ts and identifies Ionic 8.8.5. Check how the header item becomes the keyboard toggle and how heading semantics could wrap that button. Done means the accessibility tree exposes a heading at the requested level containing an operable accordion toggle.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already include this feature request, without success.
Describe the Feature Request
Allow the header of an ion-accordion to be exposed as a heading that contains the toggle
button, as in the WAI-ARIA accordion pattern: <h3><button aria-expanded>...</button></h3>.
Today there is no way to get this structure: the header ion-item only becomes the focusable
toggle when it is the direct child in the header slot, and it overrides any role set on it.
Describe the Use Case
Screen reader users navigate long pages by headings (VoiceOver rotor "Headings", TalkBack
heading navigation, NVDA/JAWS H key). In our app each Beleg (receipt) of an application is an
accordion; its title should be a level-3 heading so users can jump between them. An accessibility
audit (BITV/WCAG 1.3.1 Info and Relationships) flagged the missing headings.
What we tried (Ionic 8.8.5):
<h3 slot="header"><ion-item>...</ion-item></h3>- theh3is slotted, but theion-item
inside is not turned into the toggle: nobutton(inner element stays adiv), no
ion-focusableclass, notabindex, so it cannot be reached or activated with the keyboard.
A mouse click still toggles.<ion-item slot="header" role="heading" aria-level="3">-ion-itemoverrides the hostrole
(inList ? 'listitem' : null);aria-levelstays,roleis gone.- A heading inside the item's label works, but inverts the pattern (button contains heading):
VoiceOver's heading rotor does not reach it.
Describe Preferred Solution
A property on the accordion (e.g. headingLevel="3", or aria-level on the header item) that renders/exposes a heading wrapping the toggle button, so the accessibility tree becomes heading (level 3) > button (expanded/collapsed).
Describe Alternatives
Accept a heading element (h1-h6 or role="heading") in the header slot as a wrapper and still make the ion-item inside it the focusable toggle button.
Related Code
Reproduction (Angular, Ionic 8.8.5), page /repro/accordion "3 ion-accordion heading":
tab through the page (variant A gets no tab stop), then press "Inspect roles" (A focusable=false inner=<div>, B role=null aria-level=3).
- StackBlitz: https://stackblitz.com/github/mrambow/starterApp/tree/a11y-repros
- GitHub: https://github.com/mrambow/starterApp/blob/a11y-repros/src/app/repros/accordion.page.ts
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
- 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 ionic-team/ionic-framework
-
bug: input-otp, backspace in an empty box only moves focus instead of clearing the previous boxCó thể đã có người làm @sarankumar1325 đã nhận 23 ngày trước. Đang mởpackage: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
ionic-team/ionic-framework#31639 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: vue swipe cancellation throws when the previous page is missingCó thể đã có người làm @dandoingdev đã nhận 46 ngày trước. Đang mởpackage: vue type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ionic-team/ionic-framework#31514 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: ion-searchbar input is always labelled "search text"; aria-label on the host is not forwardedCó thể đã có người làm @HappyKnuckles đã nhận 41 ngày trước. Đang mởa11y package: core type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ionic-team/ionic-framework#31492 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: IonTabs throws when a Fragment contains one IonRouterOutletCó thể đã có người làm @Benziza đã nhận 81 ngày trước. Đang mởpackage: react type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ionic-team/ionic-framework#31410 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug: angular swipe-back gesture crashes in StackController.startBackTransition when the stack is popped before the gesture is capturedCó thể đã có người làm @officialasishkumar đã nhận 9 ngày trước. Đang mởpackage: angular type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ionic-team/ionic-framework#31291 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ionic-team/ionic-framework
Issue tương tự
-
ready-for-ai
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
umbraco/Umbraco-CMS-MCP-Dev#647 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
HelloAOLab/seed-bible#2173 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
hocinehacherouf/liberarr#77 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
LibreChat-AI/LibreChat#18225 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
b-ber/build/epub b-ber/themes
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
triplecanopy/b-ber#790 ·
Maintainer thường phản hồi trong vòng 1 ngày