Skip to content

fix accessbility issues#830

Open
masteradhoc wants to merge 1 commit intoWordPress:masterfrom
masteradhoc:accessibility-fixes
Open

fix accessbility issues#830
masteradhoc wants to merge 1 commit intoWordPress:masterfrom
masteradhoc:accessibility-fixes

Conversation

@masteradhoc
Copy link
Collaborator

What?

Fix two accessibility issues in the Two-Factor settings UI.

Why?

  • The "Primary Method" <select> had no programmatically associated label, failing WCAG 1.3.1.
  • The <fieldset id="two-factor-options"> had no <legend>, leaving screen readers without a group description for the contained controls.

How?

  • Wrapped the "Primary Method" <th> text in <label for="two-factor-primary-provider"> and added the matching id to the <select>.
  • Added <legend class="screen-reader-text">Two-Factor Options</legend> as the first child of the fieldset. The screen-reader-text class keeps it visually hidden since the <h2> above already provides the visible heading.

Testing Instructions

  1. Open a user profile page with Two-Factor active.
  2. Run an automated a11y scan (e.g. Axe, WAVE) — "select has no label" and "fieldset has no legend" errors should be gone.
  3. Navigate with a screen reader (VoiceOver/NVDA) — the primary method select should announce "Primary Method" and each checkbox within the fieldset should be preceded by "Two-Factor Options".

Changelog Entry

Fixed - "Primary Method" select and Two-Factor Options fieldset were missing accessible labels for screen readers.

@masteradhoc masteradhoc added this to the 0.16.0 milestone Mar 11, 2026
@masteradhoc masteradhoc self-assigned this Mar 11, 2026
@github-actions
Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: masteradhoc <masteradhoc@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant