-
Notifications
You must be signed in to change notification settings - Fork 635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A11y/core fixes #14935
A11y/core fixes #14935
Conversation
@@ -131,12 +131,13 @@ | |||
</div> | |||
|
|||
{% if currentUser.admin and devMode %} | |||
{% set devModeText = 'Craft CMS is running in Dev Mode.'|t('app') %} | |||
{% set devModeText = '<span lang="en">Craft CMS</span> is running in Dev Mode.'|t('app') %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brandonkelly we should update all instances of "Craft CMS" and other brand names to include a wrapper with lang="en"
. Is changing the original translation string the best way of going about this, or should a new one be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, there are 26 strings with Craft CMS
in them.
Simply adding <span>
s to them won’t really work because HTML entities are escaped by default when output by Twig tags. So we’ll need to go through each of them and make sure it’s getting output with a |raw
filter. And for JS translations, make sure that they’re not getting escaped there either.
It probably makes the most sense to keep the source translation keys the same, so we don’t have to update the message text within the PHP/Twig source files; just the translated messages (what follows the =>
s in the translation files).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brandonkelly sounds good! Just updated the PR per your feedback. The rest are lower priority since only a couple were in the representative sample we used for the audit, so I’ll update those separately.
# Conflicts: # src/web/assets/cp/dist/css/cp.css # src/web/assets/cp/dist/css/cp.css.map
[ci skip]
Description
A few quick fixes
Related issues
Resolves PT-1665, PT-1689, PT-1670, PT-1667, PT-1690