[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
Wed Nov 8 05:39:19 UTC 2023
#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: | Focuses:
---------------------------+------------------------------
Comment (by poena):
@joedolson Hi! This ticket brings up theme "continue reading" links and
"edit post" links that combine a text with a visually hidden post title.
In the themes that are mentioned in the ticket, the post title is inside
double quotes (").
Example:
{{{
the_content(
sprintf(
/* translators: %s: Post title. Only visible to screen readers. */
__( 'Continue reading<span class="screen-reader-text">
"%s"</span>', 'twentyseventeen' ),
get_the_title()
)
);
}}}
Is there any accessibility benefit to placing the post title within
quotes?
The themes are Twenty Sixteen, Twenty Seventeen, and Twenty Nineteen, so
it is not consistent across all default themes.
For example Twenty Fifteen uses the following code:
{{{
the_content(
sprintf(
/* translators: %s: Post title. Only visible to screen
readers. */
__( 'Continue reading %s', 'twentyfifteen' ),
the_title( '<span class="screen-reader-text">', '</span>',
false )
)
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40486#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list