WordPress.org

Make WordPress Core

Opened 8 weeks ago

Closed 3 weeks ago

#47040 closed defect (bug) (duplicate)

i18n: Avoid using HTML tags in translation strings in theme install

Reported by: ramiy Owned by: SergeyBiryukov
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-screenshots has-patch
Focuses: administration Cc:

Description

See the attached patch.

Attachments (2)

47040.png (18.8 KB) - added by ramiy 8 weeks ago.
47040.patch (1.5 KB) - added by ramiy 8 weeks ago.

Download all attachments as: .zip

Change History (10)

@ramiy
8 weeks ago

@ramiy
8 weeks ago

#1 follow-up: @ramiy
8 weeks ago

  • Keywords has-screenshots has-patch added

In this case one string has screen reader text but the other one don't.

I did two things:

  1. I moved the screen reader text HTML tags outside of the string.
  2. I added a screen reader text string to the second file to match the user experience.
  3. I added a target="_blank" to the other file.

#2 follow-up: @Presskopp
8 weeks ago

What about adding rel="noopener noreferrer" here?

see #37941

#3 in reply to: ↑ 2 @ramiy
8 weeks ago

Replying to Presskopp:

What about adding rel="noopener noreferrer" here?

see #37941

@Presskopp This is i18n ticket, let's leave the rel="noopener noreferrer" to a separate ticket.

#4 @SergeyBiryukov
8 weeks ago

  • Milestone changed from Awaiting Review to 5.3

#5 in reply to: ↑ 1 @SergeyBiryukov
3 weeks ago

Replying to ramiy:

I added a target="_blank" to the other file.

I'd prefer not to add any new target="_blank" attributes to links that don't currently have it, see #23432.

Looks good otherwise.

Last edited 3 weeks ago by SergeyBiryukov (previous) (diff)

#6 @ramiy
3 weeks ago

Excellent, I'll remove target="_blank". This ticket will focus only on string changes.

#7 @ramiy
3 weeks ago

@SergeyBiryukov

While updating the patch I noticed the accessibility text in wp-admin/includes/theme.php was changed.

See #47158

#8 @SergeyBiryukov
3 weeks ago

  • Milestone 5.3 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Yep, looks like this was fixed in [45298] via #47158.

Note: See TracTickets for help on using tickets.