Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#40185 closed defect (bug) (fixed)

Add opens in a new window to the Preview link

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

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 8 years ago.
40185.1.patch (1.1 KB) - added by rianrietveld 8 years ago.
Addition of translator comment
40185.2.patch (1011 bytes) - added by rianrietveld 8 years ago.
Change translator text and add less tabs

Download all attachments as: .zip

Change History (12)

@rianrietveld
8 years ago

#1 @rianrietveld
8 years ago

  • Keywords target-blank added

#2 @swissspidy
8 years ago

  • Milestone changed from Awaiting Review to Future Release

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

@rianrietveld
8 years ago

Addition of translator comment

#3 @rianrietveld
8 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
8 years ago

  • Milestone changed from Future Release to 4.8
  • Owner set to rianrietveld
  • Status changed from new to assigned
  • Version trunk deleted

#5 @SergeyBiryukov
8 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
8 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
8 years ago

Change translator text and add less tabs

#7 @rianrietveld
8 years ago

  • Keywords needs-refresh removed

#8 @SergeyBiryukov
8 years ago

  • Keywords commit added

40185.2.patch looks great.

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

#9 @SergeyBiryukov
8 years ago

  • Resolution set to fixed
  • Status changed from assigned to 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.