WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#28849 closed enhancement (wontfix)

Customizer Range Control needs to display the current value

Reported by: andy.saint Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Customize Keywords: close
Focuses: ui, accessibility Cc:

Description

The range input slider renders just fine, but there's nothing to tell the user what value they have selected. Would it be possible to add a jQuery function to display the current value in something like a span element alongside the slider?

Change History (3)

#1 @celloexpressions
7 years ago

  • Keywords close added

Hi,

I think we might consider standardizing the cross-browser behavior here in terms of appearance in the future (along with things like date and time, which only Chrome supports fully), but I don't think we'd consider adding a display of the value.

While this is a common practice (I've done it several times before, myself), I did some research when we added support for this. Range is designed to be used for fields where the exact value doesn't matter. Where the exact value does matter, number is probably more appropriate (especially if using min, max, and step) even though it isn't as fun to use. While the value of range is always represented by a number, its purpose isn't always numeric for the end-user. The point of range is to abstract the numeric representation of the value into something more visual.

I think we should stay on the side of being more conservative with this, especially since our support for range is implicit, not explicit. And, you can always use a custom control or apply some JS to the standard control to do that.

#3 @celloexpressions
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

This isn't core material. It's easy enough to implement something like this with a custom control, or even for all Customizer range controls via a plugin that applies some JS to them.

Note: See TracTickets for help on using tickets.