[wp-trac] [WordPress Trac] #40486: Standard Themes: Logic for translated strings in connection with Screen Reader text can be improved

WordPress Trac noreply at wordpress.org
Fri Nov 14 17:19:54 UTC 2025


#40486: Standard Themes: Logic for translated strings in connection with Screen
Reader text can be improved
--------------------------------------------+------------------------------
 Reporter:  Presskopp                       |       Owner:  (none)
     Type:  enhancement                     |      Status:  new
 Priority:  normal                          |   Milestone:  Awaiting Review
Component:  Bundled Theme                   |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  dev-feedback close 2nd-opinion  |     Focuses:  accessibility
--------------------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  dev-feedback => dev-feedback close 2nd-opinion


Comment:

 I agree that this is best handled in the translations themselves (for
 Twenty Sixteen and more recent themes).

 In the example from comment:9,
 `<span class="screen-reader-text">„%s“</span> Bearbeiten`
 would be read as '„Post Title“ Bearbeiten' and the browser would display
 'Bearbeiten' capitalized without the post title.

 The translation memory contains a number of German translations:
 {{{
 Bearbeite<span class="screen-reader-text"> "%s"</span>
 <span class="screen-reader-text"> „%s“</span> bearbeiten
 <span class="screen-reader-text">„%s“</span> bearbeiten
 Bearbeiten<span class="screen-reader-text"> "%s"</span>
 <span class="screen-reader-text"> "%s" </span>Bearbeiten
 }}}

 The last example is similar to comment:9, with the space inside the
 `<span>` but different quotes.

 I made a
 [https://docs.google.com/spreadsheets/d/1gz628URcR1cKexx1m2YIJG_oMRGTrokfx9xhBdaEln8/edit?usp=sharing
 spreadsheet] that gathers the classic themes' strings, their German
 translations, the HTML produced from them, and images of the German links.

 From a technical perspective, any change to translatable strings in theme
 templates and template functions would require updates to child theme
 templates and to overriding functions. Otherwise, they could lose
 translations for all languages.

 Older themes have links without screen reader text to differentiate them,
 but editing them now could be complicated.
 - T10 to T15 have `Edit` links on both the single post and archive pages
 (which can include home).
 - T10 to T12 have `Continue reading <span class="meta-nav">→</span>`
 on the archive pages.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/40486#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list