Skip to:
Content

BuddyPress.org

Opened 4 years ago

Closed 4 years ago

#6623 closed enhancement (fixed)

Accessibility: Form elements in bp-groups/

Reported by: mercime Owned by:
Milestone: 2.4 Priority: normal
Severity: normal Version:
Component: Groups Keywords:
Cc:

Description

Bind labels to form controls: add 'id' attributes to form controls as needed, add 'for' attributes to labels, and improve markup as needed.

Attachments (4)

bp-groups-widgets-title-id-for.patch (1.2 KB) - added by mercime 4 years ago.
bp-groups-widgets-linktitle-id-for.patch (1.4 KB) - added by mercime 4 years ago.
bp-groups-widgets-select-id-for.patch (1.5 KB) - added by mercime 4 years ago.
bp-groups-widgets-maxnum-id-for.patch (1.3 KB) - added by mercime 4 years ago.

Download all attachments as: .zip

Change History (20)

#1 @mercime
4 years ago

  • Keywords has-patch added

Groups Widget: Title - change the 'for' value of the label tag to match the 'id' value of the text input field.
bp-groups-widgets-title-id-for.patch

#2 @mercime
4 years ago

Groups Widget: Link Title - Add 'id' attribute for text input field and use the new 'id' value to replace the 'for' value of the label tag.
bp-groups-widgets-linktitle-id-for.php

Last edited 4 years ago by mercime (previous) (diff)

#3 @mercime
4 years ago

Groups Widget: Select element - Replace the 'for' value of the label with the value of the newly created 'id' attribute of the select element.
bp-groups-widgets-select-id-for.php

Last edited 4 years ago by mercime (previous) (diff)

#4 @mercime
4 years ago

Groups Widget: Max no. of groups- Replace the 'for' value of the label with the value of the 'id' attribute of the text field.
bp-groups-widgets-maxnum-id-for.php

#5 @hnla
4 years ago

@mercime what does the result of $this->get_field_id( 'max_groups' ) read like?

#6 @mercime
4 years ago

@hnla Thanks for checking this out.
"widget-bp_groups_widget-2-max_groups", "widget-bp_groups_widget-3-max_groups", etc.

#7 @hnla
4 years ago

@mercime was just concerned whether this pushed out a readable token, but realised it matters little as we're having to match an existing ID already in use, but albeit slightly verbose it is readable.

These all look fine though I would go ahead and commit.

Last edited 4 years ago by hnla (previous) (diff)

#8 @mercime
4 years ago

@hnla Thank you :)

#9 @mercime
4 years ago

In 10114:

Groups Widget: Replace the 'for' value with 'id' value of input field.

Accessibility fix which replaces the static 'for' value with the
dynamic 'id' value of the input field.

See #6623.

#10 @mercime
4 years ago

In 10115:

Groups Widget: Add 'id' attribute for checkbox field.

Accessibility fix to correct the value of the label 'for' attribute
and use the same dynamic value in the new 'id' attribute of the
checkbox field to link the widget title to the Groups directory page.

See #6623.

#11 @mercime
4 years ago

In 10116:

Groups Widget: Replace the 'for' value with 'id' value of input field.

Accessibility fix which replaces the static 'for' value with the
dynamic 'id' value of the input field.

See #6623.

#12 @mercime
4 years ago

In 10117:

Groups Widget: Add 'id' attribute to input field and bind to label.

Accessibility fix adds dynamic 'id' value which also replaces the old
'for' value in order to avoid duplicate 'ids' in DOM when more than
one Groups Widget is added to a theme's available widget areas. This
also unwraps the label tag from the select field.

See #6623.

#13 @DJPaul
4 years ago

  • Milestone changed from Awaiting Review to 2.4

#14 @DJPaul
4 years ago

@mercime is this ticket resolved?

#15 @DJPaul
4 years ago

  • Keywords has-patch removed

#16 @mercime
4 years ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.