Repository navigation
(fix) Translate hard-coded accessible names in the primary navigation - #2039
Open
kirill-morozov-n wants to merge 1 commit into
Open
kirill-morozov-n wants to merge 1 commit into
kirill-morozov-n wants to merge 1 commit into
Conversation
|
|
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Requirements
Summary
Six accessible names in the primary navigation were hard-coded in English, so screen reader users heard them in English in every locale. They now go through
t(), and their keys are added toesm-primary-navigation-app/translations/en.json:Header(the banner landmark)openmrs: "OpenMRS"HeaderMenuButton(Carbon also uses it as the button'stitle)openMenu: "Open menu"svgopenmrsLogo: "OpenMRS Logo"HeaderPanelnotificationsPanel: "Notifications Panel"HeaderPanelappMenuPanel: "App Menu Panel"SwitcherItemin the user menuuser: "User"The English text is unchanged.
openmrsLogois the key the login footer already uses for the same logo, and the user menuHeaderPaneland the otherSwitcherItems already label themselves this way.The en.json entries come from
extract-translations(i18next-parser), and nothing else changed in that file. Checks:yarn turbo run lint test typescript --filter=@openmrs/esm-primary-navigation-app: lint and typecheck pass, 30 tests pass;--max-warnings 0and prettier on the changed files;The login footer has one hard-coded label,
aria-label="Arrow right icon"on the frameworkArrowRightIcon. I left it alone: the frameworkIcononly rendersclassName,fillandsize, so that label never reaches the DOM.Screenshots
None — the change only affects accessible names; see the tests.
Related Issue
None. It is a follow-up to the same kind of fix in openmrs/openmrs-esm-patient-chart#3898 and openmrs/openmrs-esm-patient-management#2887.
Other
AI disclosure: implemented with Claude Code; I reviewed the changes and ran the tests listed above.