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

Mark translations that are only for screen readers #323

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

igorschoester
Copy link
Member

Context

  • Improve translator context by adding a Hidden accessibility text. comment whenever translations are only used in either screen reader texts or aria labels. To be clear: this means searching for the same translation in the same text domain, if it is used in any other context than screen reader/aria label that means no comment should be there. This is due comments appearing above all the references.

Summary

This PR can be summarized in the following changelog entry:

  • Adds mark above translations that are used only for screen readers.

Relevant technical choices:

  • It would be nice to have a search yourself, to see if I missed any instances?
    • Note that I intentionally ignored where the variable was used in more than just the screen reader, or in apps, or deprecated. Or when the same translation was used in a non screen reader capacity elsewhere.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Block/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

  • Not testable, since its only code comments.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Documentation

  • I have written documentation for this change.

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label and noted the work hours.

Fixes Yoast/wordpress-seo#19854

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6340263514

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 45.357%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/admin/views/options.php 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
src/admin/views/options.php 6 0.0%
Totals Coverage Status
Change from base Build 6319529401: -0.2%
Covered Lines: 1055
Relevant Lines: 2326

💛 - Coveralls

@vraja-pro
Copy link
Contributor

CR ✅

@vraja-pro vraja-pro merged commit 000aff6 into trunk Sep 29, 2023
15 checks passed
@vraja-pro vraja-pro deleted the 19854-a11y-mark-strings-for-screen-readers branch September 29, 2023 11:34
@vraja-pro vraja-pro added this to the 4.6 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A11y: mark strings for screen readers
3 participants