WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#40185 closed defect (bug) (fixed)

Add opens in a new window to the Preview link

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

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

Download all attachments as: .zip

Change History (12)

@rianrietveld
3 years ago

#1 @rianrietveld
3 years ago

  • Keywords target-blank added

#2 @swissspidy
3 years ago

  • Milestone changed from Awaiting Review to Future Release

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

@rianrietveld
3 years ago

Addition of translator comment

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

Change translator text and add less tabs

#7 @rianrietveld
3 years ago

  • Keywords needs-refresh removed

#8 @SergeyBiryukov
3 years ago

  • Keywords commit added

40185.1.patch looks great.

Version 0, edited 3 years ago by SergeyBiryukov (next)

#9 @SergeyBiryukov
3 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.