Add screen reader accessibility guidance and framework-level helpers
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- javascript
- Lĩnh vực
- accessibility, frontend
Hướng nghiên cứu
Trước tiên, hãy xem xét hỗ trợ DOM Elements của Phaser thông qua dom.createContainer và hạn chế về khả năng truy cập của canvas/WebGL. Xác định liệu đóng góp này nên bao gồm hạ tầng khả năng truy cập ở cấp framework hay hướng dẫn và ví dụ chính thức; công việc được xem là hoàn tất khi có phạm vi đã thống nhất bao quát các menu, việc chuyển cảnh, thông báo và quản lý tiêu điểm.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi Phaser team. This is both a feature request and a general request for guidance. I had a quick look through your open issues for dupes, but couldn't find one.
Most Phaser game content is rendered to canvas/WebGL by default. Screen reader users are therefore unable to directly access menu and game-state content when it is implemented with Phaser Text objects, sprites, menu selections, and scene changes, because that content is rendered inside the canvas/WebGL output and is not represented in the browser accessibility tree.
Example of current markup, which behaves like a black-box for screenreaders:
<div id="game-container">
<canvas width="1280" height="720"> Example Phaser game. </canvas>
</div>
I recognize this is fundamentally a browser/canvas limitation, and that Phaser cannot infer useful screen reader semantics from user-side assets like sprites.
I also saw that Phaser already supports DOM Elements through dom.createContainer, and that could be relevant to a final implementation strategy. The gap I'm running into is that I couldn't find official guidance or examples for using that feature to expose screen reader semantics for the canvas-rendered game UI.
To improve screen reader experience you'd need to manually construct a parallel DOM layer alongside the Phaser game canvas. This would include:
- visually-hidden DOM that mirrors Phaser menus
- ARIA live regions for scene changes and gameplay events
- imperative and manual focus management
- callbacks from every menu, dialog, HUD, and state change so the hidden DOM stays in sync.
While that could be done, it is a lot of duplicated infra and really brittle as it could lead to state-drift.
Would Phaser be open to providing framework-level features for better accessibility semantics?
Here's an example of an API that could be worth exploring:
this.accessibility.setSceneDescription("Main menu");
startText.setAccessible({
role: "button",
label: "Start Game",
focusable: true,
selected: true,
onActivate: () => this.startGame(),
});
this.accessibility.announce("Wave 1 starting", { priority: "polite" });
The game authors would still provide the labels, roles, states, and announcement text.
Phaser could then provide the associated DOM/live-region/focus plumbing. This would mean that downstream users don't need to manage the hidden DOM mirror manually.
Some guides on your website or in the repo would be equally helpful, particularly if there's an alternative approach that you recommend.
Optional: Do you want to help provide this feature?
Happy to open a PR if that's helpful, though I'd like to validate my assumptions first.
Thanks in advance. Big fan of the framework, keep up the great work! 💖
- Ngôn ngữ chính
- JavaScript
- Star
- 40.7k
- Fork
- 7.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 phaserjs/phaser
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Type definition for TilemapLayer.getTileAt is wrongCó thể đã có người làm @hkbughk đã nhận 34 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Shader.preDestroy leaks its ShaderQuad's vertex buffer and VAO on every create/destroy cycle (4.2.1)Có thể đã có người làm @k1epg01ng129-eng đã nhận 32 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Black opaque background on transparent Phaser.Text textures in Phaser 4.2.1 on older iOS WebGLCó thể đã có người làm @SamuelMalmfors đã nhận 14 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
phaserjs/phaser#7392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của phaserjs/phaser
Issue tương tự
-
enhancement ready
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
DCGM/semant-demo#708 ·
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 78/100
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Client codegen: an import repeated in an impl file is emitted twice, and the browser rejects the moduleCó thể đã có người làm @MalithaPrabhashana đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
jaseci-labs/jac#10756 ·
Maintainer thường phản hồi trong vòng 1 ngày