#29748 closed enhancement (fixed)
Mark strings for screen readers
Reported by: | pavelevap | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | good-first-bug has-patch commit has-dev-note |
Focuses: | accessibility | 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)
Change History (52)
This ticket was mentioned in Slack in #core-i18n by swissspidy. View the logs.
8 years ago
#4
follow-up:
↓ 6
@
8 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
@
8 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:
↓ 7
@
8 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
@
8 years ago
Replying to swissspidy:
What about simply using
screen reader text
or maybeonly visible to screen readers
?assistive text for screen readers
?
We already have a few "accessibility text" comments for aria-label
placeholders.
#8
@
8 years ago
Related BuddyPress ticket: #BuddyPress6951
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by voldemortensen. View the logs.
8 years ago
This ticket was mentioned in Slack in #core by ocean90. View the logs.
8 years ago
#17
follow-up:
↓ 18
@
8 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
@
8 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:
- 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
- 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? :)
#20
follow-up:
↓ 21
@
8 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
@
8 years ago
Replying to afercia:
I'd rather keep things simple and use something like
hidden accessibility text
.
Seems good to me.
#22
@
2 years ago
- Keywords good-first-bug added
- Milestone set to 6.2
Found this one going through tickets without milestones.
It seems like hidden accessibility text
was the preferred description that was landed on, but this was never added to the i18n handbook.
There are currently 21 occurrences of translators: accessibility text
in trunk
, all in JS files. These instances are also a bit more verbose, such as accessibility text for the widgets screen top bar landmark region
and accessibility text for the footer landmark region
.
The patches attached here also need to be refreshed. A GitHub pull request would probably be best to manage these.
This ticket was mentioned in Slack in #accessibility by ryokuhi. View the logs.
21 months ago
This ticket was mentioned in Slack in #core by costdev. View the logs.
21 months ago
This ticket was mentioned in PR #3970 on WordPress/wordpress-develop by @kebbet.
21 months ago
#26
- Keywords needs-refresh removed
Trac ticket:
#28
@
21 months ago
In linked PR: All screen reader strings in wp-admin
have an added comment on its visibility. The ones which has a placeholder are constructed like this:
/* translators: hidden accessibility text. %s: Theme name */
#29
@
21 months ago
- Keywords needs-refresh removed
Linked PR at GitHub is ready for review, only 132
files touched. And only PHP-files.
I kept some existing translation comments like
/* translators: Only visible to screen readers */
And I went with this comment everywhere else:
/* translators: hidden accessibility text */
This ticket was mentioned in Slack in #accessibility by kebbet. View the logs.
21 months ago
@SergeyBiryukov commented on PR #3970:
21 months ago
#31
Thanks for the PR!
Pretty much all of the comments in core are capitalized and end with a period, so let's do the same here:
/* translators: Hidden accessibility text. */
There are also these comments previously used for the same purpose (32 matches in 16 files)
/* translators: Accessibility text. */
Let's change them to use new wording too, for consistency.
21 months ago
#32
Thanks for the PR!
Pretty much all of the comments in core are capitalized and end with a period, so let's do the same here:
/* translators: Hidden accessibility text. */There are also these comments previously used for the same purpose (32 matches in 16 files)
/* translators: Accessibility text. */Let's change them to use new wording too, for consistency.
Thank you for the review. I will adjust the PR later tonight.
21 months ago
#33
@SergeyBiryukov pr updated in response to your comment. Maybe ready for final review and commit?
#37
@
20 months ago
The ticket owner has not been active for years, could someone else take ownership and get this commited before 6.2 beta1?
@costdev @audrasjb @SergeyBiryukov
#38
@
20 months ago
- Owner changed from mercime to SergeyBiryukov
- Status changed from assigned to reviewing
#39
@
20 months ago
I checked the changeset and it looks good to ship with 6.2 on my side!
Let's commit this before beta 1.
@SergeyBiryukov commented on PR #3970:
20 months ago
#42
Thanks for the PR!
I have found a few misaligned closing tags and tried to correct them on commit, also made some minor formatting edits for consistency. Looks great to me otherwise 🙂
Merged in r55276.
A translator comment sounds like a good idea.