Skip to content

Accessibility - labels aren't clickable #1057

Open
@edent

Description

@edent

The "Search subscribers" page has this searchbox:

image

Clicking on the labels doesn't toggle the checkboxes. The HTML is currently:

<label for="unconfirmed">
   Show only unconfirmed subscribers:
  <input type="checkbox" name="unconfirmed" value="1">
</label>

In order to work, the <input> needs to have an id which matches the label's for. For example:

<input id="unconfirmed">

I'd like to create a PR to fix that in:

$filterpanel .= sprintf('<form method="get" name="listcontrol" action="">
<input type="hidden" name="page" value="users" />
<input type="hidden" name="start" value="%d" />
<input type="hidden" name="find" value="%s" />
<input type="hidden" name="findby" value="%s" />
<label for="unconfirmed">%s:<input onclick="if (this.checked && form.confirmed.checked) form.confirmed.checked=false" type="checkbox" name="unconfirmed" value="1" %s /></label>
<label for="blacklisted">%s:<input onclick="if (this.checked && form.nonblacklisted.checked) form.nonblacklisted.checked=false" type="checkbox" name="blacklisted" value="1" %s /></label>
<div class="clearfix"></div>
<label for="confirmed">%s:<input onclick="if (this.checked && form.unconfirmed.checked) form.unconfirmed.checked=false" type="checkbox" name="confirmed" value="1" %s /></label>
<label for="backlisted">%s:<input onclick="if (this.checked && form.blacklisted.checked) form.blacklisted.checked=false"type="checkbox" name="nonblacklisted" value="1" %s /></label>',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions