WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 5 months ago

#14097 new enhancement

Idea for placeholder text

Reported by: markjaquith Owned by:
Priority: lowest Milestone: Future Release
Component: Administration Version:
Severity: trivial Keywords: ui-focus
Cc:

Description

Placeholder text has a fatal flaw, in my mind: once the field is focused, that placeholder text is gone. This can be confusing, especially if you tabbed into that field or it was selected by default. You can actually use placeholder text instead of labels, for a minimalistic form layout, but only if you correct this flaw.

So here's a potential solution:

http://txfx.net/files/wordpress/labels/

It uses HTML 5's placeholder attribute (newest Safari and Chrome support it), with a jQuery plugin to handle that support for other browsers.

Thoughts?

Change History (6)

comment:1 nacin3 years ago

  • Keywords ux-feedback added

Looks cool. Didn't realize the placeholder attribute was already being supported.

comment:2 scribu3 years ago

I don't see the advantage of using the placeholder attribute if, in the end, it's going to take up as much space as a regular label would.

comment:3 filosofo3 years ago

I second what scribu says: if there's enough room for a label below the input, just put it there with CSS consistently. Then those with JS disabled and screen-readers don't miss out on labels.

Also note that the W3C HTML 5 working draft explicitly says

The placeholder attribute should not be used as an alternative to a label.


comment:4 jane3 years ago

When Mark and I first talked about this, it was re the Title field on the post editor, which uses placeholder text instead of a visual label for visual design reasons, though it has a "label" for screen readers. I need to read up on the accessibility issues, but if accessibility can be worked out, I think this approach has a lot of potential and would be worth doing some prototype screens and testing with users. I'm thinking specifically of media uploader or the Settings section.

comment:5 nacin3 years ago

  • Milestone changed from Awaiting Review to Future Release

comment:6 sabreuse5 months ago

  • Component changed from UI to Administration
  • Keywords ui-focus added; ux-feedback removed
Note: See TracTickets for help on using tickets.