buddypress / next-template-packs

is this the next BuddyPress template pack?
35 stars 9 forks source link

Textareas need to be associated with label tags #114

Closed mercime closed 7 years ago

mercime commented 7 years ago

There are at least a couple of areas where there are missing <label> tags. Here's one of them: textarea-messages

mercime commented 7 years ago

bp-nouveau/buddypress/_accessoires/invites/index.php:

<script type="text/html" id="tmpl-bp-invites-form">
    <textarea placeholder="<?php esc_attr_e( 'Optional: add a message to your invite.', 'bp-nouveau' ); ?>"></textarea>

to

<script type="text/html" id="tmpl-bp-invites-form">
        <label for="bp-invites-message" class="bp-invites-label"><?php esc_html_e(  'Optional: add a message', 'bp-nouveau' ); ?></label>
    <textarea id="bp-invites-message" name="bp-invites-message"></textarea>

Values for the IDs, class, and name attributes, I leave up to you. When there is a label, the placeholder information is redundant and extra noise for users of screen readers.

hnla commented 7 years ago

Yep that textarea should have a label. What will happen with the placeholder text though? Imath added that as clearly he wanted the text within the textarea and it looks neat for visual display.

mercime commented 7 years ago

Add class="bp-label-in-here" to form control for animation in #130.

hnla commented 7 years ago

Closing.