Skip to content

a11y: associate a visible-hidden label with the room-name input#538

Open
xpoes123 wants to merge 1 commit into
qbreader:mainfrom
xpoes123:a11y/mp-room-name-label
Open

a11y: associate a visible-hidden label with the room-name input#538
xpoes123 wants to merge 1 commit into
qbreader:mainfrom
xpoes123:a11y/mp-room-name-label

Conversation

@xpoes123

@xpoes123 xpoes123 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The room-name input on the multiplayer lobby page had no programmatically associated label, so screen readers could not announce its purpose when the field received focus.

Problem

In client/play/mp/index.html, the <input id="new-room-name"> was accompanied only by adjacent prose ("Create/Join a Room:") with no <label for="new-room-name"> association. Assistive technologies rely on the for/id link to identify an input's purpose.

Changes

  • Adds <label class="visually-hidden" for="new-room-name">Room name</label> immediately before the input inside the existing input-group.

Risk & testing

Markup-only change; visual layout is unchanged. visually-hidden is the Bootstrap utility class already used elsewhere in the codebase for screen-reader-only text. No JavaScript or styles are affected.

@xpoes123 xpoes123 changed the title a11y: label the multiplayer room-name input a11y: associate a visible-hidden label with the room-name input Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant