Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#40185 closed defect (bug) (fixed)

Add opens in a new window to the Preview link

Reported by: rianrietveld Owned by: rianrietveld
Priority: normal Milestone: 4.8
Component: Administration Version:
Severity: normal Keywords: target-blank has-patch commit
Cc: Focuses: accessibility

Description

Tracking ticket #23432
For some links it is useful to open in a new window. One of them is the Preview link when adding or editing a post.
Then the screen reader user has to be warned the link opens in a new window.

Attachments (3)

40185.patch​ (1002 bytes ) - added by rianrietveld 10 years ago.
40185.1.patch​ (1.1 KB ) - added by rianrietveld 10 years ago.
Addition of translator comment
40185.2.patch​ (1011 bytes ) - added by rianrietveld 10 years ago.
Change translator text and add less tabs

Download all attachments as: .zip

Change History (12)

@rianrietveld
10 years ago

#1 @rianrietveld
10 years ago

  • Keywords target-blank added

#2 @swissspidy
10 years ago

  • Milestone Awaiting Review → Future Release

Do we want to add a comment like hidden accessibility text? See #29748.

@rianrietveld
10 years ago

Addition of translator comment

#3 @rianrietveld
10 years ago

@swissspidy last patch adds comment for translators.
I checked the other places where this string occurs and there was no comment yet.

#4 @afercia
10 years ago

  • Milestone Future Release → 4.8
  • Owner set to rianrietveld
  • Status new → assigned
  • Version trunk

#5 @SergeyBiryukov
10 years ago

  • Keywords needs-refresh added
  • We use accessibility text translator comment for strings like this, see [40033] for example.
  • Looks like there's an extra tab character in line 60.

Looks good to me otherwise :)

#6 @SergeyBiryukov
10 years ago

Minor nitpicking: sprintf() arguments generally don't need a lot of tabs or spaces for alignment, this should be enough:

$preview_button = sprintf( '%1$s<span class="screen-reader-text"> %2$s</span>',
	esc_html( $preview_button_text ),
	/* translators: accessibility text */
	esc_html__( '(link opens in a new window)' )
);

@rianrietveld
10 years ago

Change translator text and add less tabs

#7 @rianrietveld
10 years ago

  • Keywords needs-refresh removed

#8 @SergeyBiryukov
10 years ago

  • Keywords commit added

40185.2.patch​ looks great.

Last edited 9 years ago by SergeyBiryukov (previous) (diff)

#9 @SergeyBiryukov
9 years ago

  • Resolution → fixed
  • Status assigned → closed

In 40422:

Administration: Add "(link opens in a new window)" as a screen reader text for "Preview" link on Edit Post screen.

Props rianrietveld.
Fixes #40185.

Note: See TracTickets for help on using tickets.