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

fix: Accessibility [2.4.1]: Provide a skip links option Fixes #6575 #10168

Merged
merged 12 commits into from
May 16, 2024

Conversation

abbyrhart
Copy link
Contributor

What

Added skip to content links on templated main page, added "Skip to Content" translation in available languages.

Screenshot

Screenshot 2024-04-24 at 12 25 03 AM

Related issue(s) and discussion

@abbyrhart abbyrhart requested a review from a team as a code owner April 24, 2024 04:26
@github-actions github-actions bot added ✏️ Editing 🗺️ Maps CSS 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. recipes 👥 Users 🔐 Password 👮 Moderation 🌐 Translations Site layout 🔎 Search Top translators 💥 Merge Conflicts 💥 Merge Conflicts labels Apr 24, 2024
po/common/ar.po Outdated
@@ -6809,3 +6809,6 @@ msgctxt "nutrient_info_proteins_benefit"
msgid "Foods that are rich in proteins are usually rich in calcium or iron which are essential minerals with numerous health benefits."
msgstr ""

msgctxt "skip_to_content"
msgid "Skip to Content"
msgstr "تخطى الى المحتوى"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to add all translations, as we will use Crowdin to get translations. But you need at least to have the changes in en.po (as you did) and also common.pot which is the file used by Crowdin.

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @abbyrhart ! Can you just add the new string to po/common/common.pot?

@codecov-commenter
Copy link

codecov-commenter commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.89%. Comparing base (dc04d18) to head (344cc29).
Report is 301 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10168      +/-   ##
==========================================
+ Coverage   49.54%   49.89%   +0.34%     
==========================================
  Files          67       71       +4     
  Lines       20650    21034     +384     
  Branches     4980     5041      +61     
==========================================
+ Hits        10231    10494     +263     
- Misses       9131     9245     +114     
- Partials     1288     1295       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@teolemon teolemon added the accessibility ♿ Ensuring Open Food Facts is accessible to all label Apr 24, 2024
@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label Apr 24, 2024
@abbyrhart
Copy link
Contributor Author

Looks good, thank you @abbyrhart ! Can you just add the new string to po/common/common.pot?

Yes, just did that! @stephanegigandet should I make a new PR or is there a way to add this code here?

@stephanegigandet
Copy link
Contributor

Yes, just did that! @stephanegigandet should I make a new PR or is there a way to add this code here?

@abbyrhart : you can just commit your changes and do "git push" on your branch in it will update this PR.

@abbyrhart
Copy link
Contributor Author

@abbyrhart : you can just commit your changes and do "git push" on your branch in it will update this PR.

@stephanegigandet Done! Let me know if there is anything else you need me to do.

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label May 8, 2024
@github-actions github-actions bot removed the 💥 Merge Conflicts 💥 Merge Conflicts label May 14, 2024
Copy link

sonarcloud bot commented May 16, 2024

Quality Gate Passed Quality Gate passed

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
1.1% Duplication on New Code

See analysis details on SonarCloud

@4nt0ineB 4nt0ineB merged commit 3ab8159 into openfoodfacts:main May 16, 2024
13 checks passed
@alexgarel
Copy link
Member

alexgarel commented May 17, 2024

Thanks @abbyrhart for this contribution 🎉 !

john-gom pushed a commit that referenced this pull request May 24, 2024
…10168)

* Added skip links and language translations

* removed skip to content

* Fixed skip to content focus

* Added skip links and language translations

* fixed squash

* Updated common.pot to fix skip to content translation

* expected test results updated

* fix fr translation

---------

Co-authored-by: Stéphane Gigandet <stephane@openfoodfacts.org>
Co-authored-by: Alex Garel <alex@openfoodfacts.org>
Co-authored-by: Pierre Slamich <pierre@openfoodfacts.org>
Co-authored-by: Antoine B <antoine.bastos@edu.univ-eiffel.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility ♿ Ensuring Open Food Facts is accessible to all CSS ✏️ Editing 🗺️ Maps 👮 Moderation 🔐 Password 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers recipes 🔎 Search Site layout Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests Top translators 🌐 Translations 👥 Users
Development

Successfully merging this pull request may close these issues.

Accessibility [2.4.1]: Provide a skip links option to let a user skip repetitive content. (Bypass Blocks)
6 participants