[wp-trac] [WordPress Trac] #47318: Fix the placeholder for the post title field on the classic Edit Post screen

WordPress Trac noreply at wordpress.org
Sun Aug 25 15:59:35 UTC 2019


#47318: Fix the placeholder for the post title field on the classic Edit Post
screen
-------------------------------------------------+-------------------------
 Reporter:  azaozz                               |       Owner:  azaozz
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  5.3
Component:  Administration                       |     Version:
 Severity:  minor                                |  Resolution:
 Keywords:  good-first-bug has-patch has-        |     Focuses:
  screenshots needs-refresh                      |  accessibility
-------------------------------------------------+-------------------------

Comment (by afercia):

 > doing things in a standard way is most forward compatible

 @azaozz totally agree but we're not doing it anyways. The placeholder
 attribute should not be used as a label (#40331). It is meant to
 "associate additional information with an element, such as instructions or
 format requirements for an input field".

 That said, not sure Chrome + NVDA are wrong. [https://www.w3.org/TR/wai-
 aria-practices-1.1/#names_and_descriptions_definition The accessible name
 and description] are two different properties with different purposes.
 There's a complicated [https://www.w3.org/TR/wai-aria-
 practices-1.1/#name_calculation fallback mechanism for their calculation]
 (see [https://www.w3.org/TR/accname-1.1/ algorithm details]). In our case:
 - accessible name: the visually hidden `<label>`
 - accessible description: the `placeholder` attribute

 I'm not sure there's anything in the specs that states what should happen
 when the accessible name and description have the same value. The fact
 some browser / screen reader combinations announce only the label seems to
 me more an implementation choice of the browser / assistive technology to
 avoid redundancy. Note: I've updated the codepen.

 That said, I'd recommend to not use the placeholder attribute this way.

 If that's not possible, I'd tend to think it's better to accept the double
 announcement rather than making the input field not usable with some
 assistive technologies.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47318#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list