Skip to content

Conversation

@TylerZeroMaster
Copy link
Contributor

https://openstax.atlassian.net/browse/CORE-1376

Adds specific phrases for tables/figures/etc. and a catch-all default (in post bake) for when aria-label is missing.

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (052cab0) to head (64603f6).
⚠️ Report is 1 commits behind head on main.

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #424   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          219       219           
  Lines         3706      3719   +13     
=========================================
+ Hits          3706      3719   +13     
Files with missing lines Coverage Δ
lib/kitchen/debug/print_recipe_error.rb 100.00% <100.00%> (ø)
...e_chapter_introductions/bake_chapter_objectives.rb 100.00% <100.00%> (ø)
lib/kitchen/directions/bake_link_placeholders.rb 100.00% <100.00%> (ø)
lib/kitchen/directions/bake_references/v1.rb 100.00% <100.00%> (ø)
lib/kitchen/patches/i18n.rb 100.00% <100.00%> (ø)
lib/kitchen/recipe.rb 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TylerZeroMaster TylerZeroMaster force-pushed the CORE-1376-actionable-link-desc branch from a3f6376 to 79b551f Compare December 15, 2025 19:03
Copy link
Member

@jivey jivey 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 just a couple of questions

chapter.non_introduction_pages.map do |page|
number = page.os_number(options[:numbering_options])
title_text = page.title_children.map(&:text).join(' ')
label = I18n.t(:section_link_desc, link_text: "#{number} #{title_text}")
Copy link
Member

Choose a reason for hiding this comment

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

I see section_link_desc added to Spanish and Polish locales, but not the English locale, is that a problem?

Copy link
Contributor Author

@TylerZeroMaster TylerZeroMaster Dec 16, 2025

Choose a reason for hiding this comment

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

Yes, that's why you see "Translation missing: en.section_link_desc" in the expected output. Oops 🤦.

end

I18n.translate(:generic_link_desc, link_text: text)
end
Copy link
Member

Choose a reason for hiding this comment

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

Will these raise if not found, in case they get renamed/removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will add something like "Translation missing: en.generic_link_desc".

Copy link
Member

Choose a reason for hiding this comment

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

Ah right, if this gem works the same as what I recall about Rails, you have to tell it to raise. I was thinking it could be hard to tell because it won't show up visually rendered. But I might be over worrying.

@TylerZeroMaster TylerZeroMaster merged commit 6c49bb9 into main Dec 17, 2025
6 checks passed
@TylerZeroMaster TylerZeroMaster deleted the CORE-1376-actionable-link-desc branch December 17, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants