Opened 10 years ago
Closed 9 years ago
#31540 closed enhancement (fixed)
Dropdown pages Customizer description option
Reported by: | _smartik_ | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.1.1 |
Component: | Customize | Keywords: | has-patch needs-testing |
Focuses: | ui | Cc: |
Description
The only control missing a description is 'dropdown-pages'.
Attachments (3)
Change History (15)
#1
@
9 years ago
I looked through class-wp-customize-control.php and there is a lot of stuff changed in there. I created a patch 31540.2.diff for the item mentioned in this ticket and used a similar structure to other items in the switch.
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
9 years ago
#5
@
9 years ago
- Focuses accessibility removed
While I agree that for consistency also the dropdown-pages
control should have a description, I'm going to remove the accessibility focus. This control does have a label and this is the most important thing from an accessibility point of view. Feel free to add the keyword again if I'm missing something.
The description is currently used to "expand" the label text. I'm not sure having this expanded text (wich may be very long) inside the label element is a good thing for semantics. See screenshot below. Labels should be very short. Expanded descriptions should be after the form element. By the way this is out of this ticket scope and affects all the controls. WIll report in a separate ticket.
#6
follow-up:
↓ 7
@
9 years ago
Hi @afercia. Did you have a chance to file that ticket about moving descriptions below elements? If so, could you link?
I agree the description should be added. I found this ticket while trying to trace down why it wasn't showing up for me in a theme.
The latest patch from @MikeHansenMe worked well for me. I tested it and will post a refresh.
If anyone else would like to test, here's some boilerplate dropdown customizer code you can drop in:
/** * Add page selector to the customizer. * * @since Theme 1.0.0 * * @param WP_Customize_Manager $wp_customize Customizer object. */ function prefix_customize_register( $wp_customize ) { $wp_customize->add_section( 'dropdown-pages-example' , array( 'title' => __( 'Dropdown Pages', 'textdomain' ), 'priority' => 30, ) ); // Add color scheme setting and control. $wp_customize->add_setting( 'showcase-page-1', array( 'default' => '', 'sanitize_callback' => 'absint' ) ); $wp_customize->add_control( 'showcase-page-1', array( 'label' => __( 'Select Page', 'textdomain' ), 'section' => 'dropdown-pages-example', 'type' => 'dropdown-pages', 'description' => __( 'Testing description.', 'textdomain' ), ) ); } add_action( 'customize_register', 'prefix_customize_register', 12 );
#7
in reply to:
↑ 6
@
9 years ago
Replying to downstairsdev:
Hi @afercia. Did you have a chance to file that ticket about moving descriptions below elements? If so, could you link?
Hi @downstairsdev, it was reported in this ticket: https://core.trac.wordpress.org/ticket/32493#comment:4. Notice that ticket was originally meant to be a tracking ticket for general Customizer accessibility issues but then changed in a ticket for just one specific issue. So we should split ouf from the ticket all the secondary issues and create separate tickets.
#8
@
9 years ago
For context, @celloexpressions mentioned via Twitter they really just had the core use case in mind when building this control. So it makes sense why description wasn't originally included. However, I feel like a lot of people are using it for their own themes and integrations now- so this should be added for consistency.
#9
@
9 years ago
- Keywords needs-refresh added
- Milestone changed from Future Release to 4.4
#33085 has the accessibility fixes. We should proceed with 31540.3.diff here in the meantime as it's consistent with everything else.
The label element needs to retain the customize-control-select
class; other than that, this should be ready for commit.
Also, for reference, https://core.trac.wordpress.org/ticket/27981#comment:3.
#10
follow-up:
↓ 11
@
9 years ago
- Keywords needs-testing added; needs-refresh removed
@afercia: Can you please review 31540.3.diff as it apparently contains accessibility fixes?
Added description support for 'dropdown-pages' control