WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 2 months ago

#29748 assigned enhancement

Mark strings for screen readers

Reported by: pavelevap Owned by: mercime
Milestone: Priority: normal
Severity: normal Version:
Component: I18N Keywords: has-patch needs-refresh
Focuses: Cc:

Description

Sometimes there are "hidden" strings which are for screen readers, but translators have to search for context to find the real meaning. Maybe we could mark all these strings somehow (comment for translators or context) to make it easier?

I can create patch if you think that it is a good idea (and we can also discuss best solution before: comment or context).

Attachments (5)

29748.patch (7.3 KB) - added by mercime 3 years ago.
First batch of translator comments for accessibility text
29748-2ndbatch.patch (70.8 KB) - added by mercime 3 years ago.
Second batch of translator comments for accessibility text
29748-wp-admin.patch (117.0 KB) - added by mercime 3 years ago.
wp-admin - refreshed translator comments
29748-wp-includes.patch (27.8 KB) - added by mercime 3 years ago.
wp-includes - refreshed translator comments
29748-wp-content.patch (31.4 KB) - added by mercime 3 years ago.
wp-content - refreshed translator comments

Download all attachments as: .zip

Change History (26)

#1 @boonebgorges
5 years ago

  • Version trunk deleted

#2 @SergeyBiryukov
4 years ago

A translator comment sounds like a good idea.

This ticket was mentioned in Slack in #core-i18n by swissspidy. View the logs.


3 years ago

#4 follow-up: @ocean90
3 years ago

  • Milestone changed from Awaiting Review to Future Release

A translator comment might be helpful, yes.

@swissspidy proposed that this should be added to the handbook (https://make.wordpress.org/core/handbook/best-practices/internationalization/) and considered for future strings. I tend to agree with that. Any suggestions for a comment?

#5 @Chouby
3 years ago

A translator comment looks more adapted than context for me. May be useful to add this to https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/ to extend the practice to plugins (the same for themes).

#6 in reply to: ↑ 4 ; follow-up: @swissspidy
3 years ago

Replying to ocean90:

A translator comment might be helpful, yes.

@swissspidy proposed that this should be added to the handbook (https://make.wordpress.org/core/handbook/best-practices/internationalization/) and considered for future strings. I tend to agree with that. Any suggestions for a comment?

What about simply using screen reader text or maybe only visible to screen readers? assistive text for screen readers?

#7 in reply to: ↑ 6 @ocean90
3 years ago

Replying to swissspidy:

What about simply using screen reader text or maybe only visible to screen readers? assistive text for screen readers?

We already have a few "accessibility text" comments for aria-label placeholders.

#8 @SergeyBiryukov
3 years ago

Related BuddyPress ticket: #BuddyPress6951

#9 @SergeyBiryukov
3 years ago

  • Keywords needs-patch added

@mercime
3 years ago

First batch of translator comments for accessibility text

#10 @mercime
3 years ago

  • Keywords has-patch added; needs-patch removed

#11 @netweb
3 years ago

  • Milestone changed from Future Release to 4.6

@mercime
3 years ago

Second batch of translator comments for accessibility text

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


3 years ago

#13 @chriscct7
3 years ago

  • Owner set to mercime
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core by voldemortensen. View the logs.


3 years ago

@mercime
3 years ago

wp-admin - refreshed translator comments

@mercime
3 years ago

wp-includes - refreshed translator comments

@mercime
3 years ago

wp-content - refreshed translator comments

#15 @mercime
3 years ago

Refreshed patches are attached and re-organized as follows for your review:

This ticket was mentioned in Slack in #core by ocean90. View the logs.


3 years ago

#17 follow-up: @jipmoors
3 years ago

Just adding "accessibility text" doesn't really complete clarifying the context for the strings. Especially for "Page" which I saw as a pagination use.

#18 in reply to: ↑ 17 @afercia
3 years ago

Replying to jipmoors:

Just adding "accessibility text" doesn't really complete clarifying the context for the strings. Especially for "Page" which I saw as a pagination use.

Yep maybe the text could be improved a bit. What translators really need to know? I'd say:

  1. it's hidden text, not visible in the UI so better they don't waste time trying to find the place where this text is displayed because... well, it is not displayed at all
  2. it is used to expand short labels and sentences to give more context or add feedback where otherwise the feedback is only visual

Anyone able to summarise all this in a very short sentence? :)

#19 @ocean90
3 years ago

  • Keywords needs-refresh added
  • Milestone changed from 4.6 to Future Release

#20 follow-up: @afercia
3 years ago

Strings used to expand UI controls text and strings used for wp.a11y.speak() messages are a bit different in their scope, but I'd rather keep things simple and use something like hidden accessibility text. Any thoughts welcome!

#21 in reply to: ↑ 20 @SergeyBiryukov
3 years ago

Replying to afercia:

I'd rather keep things simple and use something like hidden accessibility text.

Seems good to me.

Note: See TracTickets for help on using tickets.