Skip to content

gdpr-field.php's disabled-notice branch has a dangling aria-labelledby reference #3478

Description

@vivi-the-going-merry

Background

formidable-forms#3465 fixed the Safari VoiceOver double-announcement bug on checkbox and GDPR fields (Strategy11/formidable-pro#6750) by dropping the redundant for attribute from a <label> that already wraps its <input>.

franky-review's second round on #3465 flagged a separate, pre-existing issue in the same file (confirmed present in origin/master before that PR, not introduced by it): classes/views/frm-fields/front-end/gdpr/gdpr-field.php's disabled-notice branch (rendered when GDPR is disabled and the current user can edit forms) wraps its notice in a <div ... aria-labelledby="<?php echo esc_attr( $label_id ); ?>">, but that branch never renders any element carrying $label_id as its id — only the other, enabled branch's <input> does, and the two branches are mutually exclusive. So the group has a dangling aria-labelledby reference here — no accessible name for assistive tech on the notice.

#3465 stayed scoped to the duplicate-announcement fix, so this is filed separately, same pattern as #3475.

Suggested fix

Drop the aria-labelledby attribute on that <div> in the disabled-notice branch, since it has nothing valid to reference.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions