Skip to content
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

Merged
merged 12 commits into from
May 23, 2024
Merged

A11y/core fixes #14935

merged 12 commits into from
May 23, 2024

Conversation

gcamacho079
Copy link
Contributor

Description

A few quick fixes

Related issues

Resolves PT-1665, PT-1689, PT-1670, PT-1667, PT-1690

@gcamacho079 gcamacho079 added the accessibility 👤 features related to accessibility label May 3, 2024
@@ -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') %}
Copy link
Contributor Author

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?

Copy link
Member

@brandonkelly brandonkelly May 3, 2024

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).

Copy link
Contributor Author

@gcamacho079 gcamacho079 May 6, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility 👤 features related to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants