Repository navigation
Fix Tab/Shift+Tab traversal in tab controls and name the tab scroll buttons - #5546
Open
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Open
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Gabriel Dufresne (GabrielDuf) wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Kurdish screen-reader names need to match the locale’s existing Sorani language variety and script.
1 open issue
What changed in this PR
Addresses #5543 by correcting tab-control keyboard traversal and naming the installation-options tab scroll buttons for screen readers.
Changes:
- Registers an app-wide focus guard that restores the selected tab as the header’s tab stop.
- Adds translated accessibility names for both scroll buttons.
- Adds the two strings to all 60 language files.
| File | Description |
|---|---|
| src/UniGetUI.Avalonia/Views/DialogPages/InstallOptionsControl.axaml.cs | Sets translated scroll-button names. |
| src/UniGetUI.Avalonia/Infrastructure/TabControlFocusGuard.cs | Corrects tab-header focus tracking. |
| src/UniGetUI.Avalonia/App.axaml.cs | Installs the focus guard. |
| src/Languages/lang_zh_TW.json | Adds Traditional Chinese labels. |
| src/Languages/lang_zh_CN.json | Adds Simplified Chinese labels. |
| src/Languages/lang_vi.json | Adds Vietnamese labels. |
| src/Languages/lang_uz.json | Adds Uzbek labels. |
| src/Languages/lang_ur.json | Adds Urdu labels. |
| src/Languages/lang_uk.json | Adds Ukrainian labels. |
| src/Languages/lang_tr.json | Adds Turkish labels. |
| src/Languages/lang_tl.json | Adds Tagalog labels. |
| src/Languages/lang_th.json | Adds Thai labels. |
| src/Languages/lang_ta.json | Adds Tamil labels. |
| src/Languages/lang_sv.json | Adds Swedish labels. |
| src/Languages/lang_sr.json | Adds Serbian labels. |
| src/Languages/lang_sq.json | Adds Albanian labels. |
| src/Languages/lang_sl.json | Adds Slovenian labels. |
| src/Languages/lang_sk.json | Adds Slovak labels. |
| src/Languages/lang_si.json | Adds Sinhala labels. |
| src/Languages/lang_sa.json | Adds Sanskrit labels. |
| src/Languages/lang_ru.json | Adds Russian labels. |
| src/Languages/lang_ro.json | Adds Romanian labels. |
| src/Languages/lang_pt_PT.json | Adds European Portuguese labels. |
| src/Languages/lang_pt_BR.json | Adds Brazilian Portuguese labels. |
| src/Languages/lang_pl.json | Adds Polish labels. |
| src/Languages/lang_nn.json | Adds Norwegian Nynorsk labels. |
| src/Languages/lang_nl.json | Adds Dutch labels. |
| src/Languages/lang_nb.json | Adds Norwegian Bokmål labels. |
| src/Languages/lang_mr.json | Adds Marathi labels. |
| src/Languages/lang_mk.json | Adds Macedonian labels. |
| src/Languages/lang_lt.json | Adds Lithuanian labels. |
| src/Languages/lang_ku.json | Adds Kurdish labels. |
| src/Languages/lang_ko.json | Adds Korean labels. |
| src/Languages/lang_kn.json | Adds Kannada labels. |
| src/Languages/lang_ka.json | Adds Georgian labels. |
| src/Languages/lang_ja.json | Adds Japanese labels. |
| src/Languages/lang_it.json | Adds Italian labels. |
| src/Languages/lang_id.json | Adds Indonesian labels. |
| src/Languages/lang_hu.json | Adds Hungarian labels. |
| src/Languages/lang_hr.json | Adds Croatian labels. |
| src/Languages/lang_hi.json | Adds Hindi labels. |
| src/Languages/lang_he.json | Adds Hebrew labels. |
| src/Languages/lang_gu.json | Adds Gujarati labels. |
| src/Languages/lang_gl.json | Adds Galician labels. |
| src/Languages/lang_fr.json | Adds French labels. |
| src/Languages/lang_fil.json | Adds Filipino labels. |
| src/Languages/lang_fi.json | Adds Finnish labels. |
| src/Languages/lang_fa.json | Adds Persian labels. |
| src/Languages/lang_et.json | Adds Estonian labels. |
| src/Languages/lang_es.json | Adds Spanish labels. |
| src/Languages/lang_es-MX.json | Adds Mexican Spanish labels. |
| src/Languages/lang_eo.json | Adds Esperanto labels. |
| src/Languages/lang_en.json | Defines English source labels. |
| src/Languages/lang_el.json | Adds Greek labels. |
| src/Languages/lang_de.json | Adds German labels. |
| src/Languages/lang_da.json | Adds Danish labels. |
| src/Languages/lang_cs.json | Adds Czech labels. |
| src/Languages/lang_ca.json | Adds Catalan labels. |
| src/Languages/lang_bn.json | Adds Bengali labels. |
| src/Languages/lang_bg.json | Adds Bulgarian labels. |
| src/Languages/lang_be.json | Adds Belarusian labels. |
| src/Languages/lang_ar.json | Adds Arabic labels. |
| src/Languages/lang_af.json | Adds Afrikaans labels. |
Review effort: Balanced
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "6bf873b0-cbe5-11f1-83db-79e51a2375ce",
"headSha": "f08004a550a62254c73bbb61f087540ad5cf8296",
"reviewer": "copilot-pull-request-reviewer[bot]"
}|
Maybe related to AvaloniaUI/Avalonia#22003 |
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.

Root cause
Avalonia's
ItemsControl.OnGotFocusrecords any focused descendant as the control'sTabOnceActiveElement, andTabControlcopies that value onto its tab-header panel (TabNavigation=Once). As soon as something inside the selected tab's content, or a template part such as the tab-strip scroll chevrons, got focus, the header panel's single tab stop pointed at an element outside the panel:This is still the behaviour in Avalonia 12.1.0.
Fix
TabControlFocusGuard: an app-wideGotFocusclass handler onTabControl, installed inApp.Initializenext toButtonActivationGuard. It runs afterItemsControl's handler and, unless the focused element is one of that control's own tab items, resetsTabOnceActiveElementto the selected tab item. The ownership check usesIndexFromContainerinstead of a type test, so a nestedTabControl's headers still reset the outer one. Because it's app-wide, the About, Manage shortcuts and Operation history tab controls are fixed too.Path, so screen readers announced Avalonia.Controls.Shapes.Path. They now get the WinUI TabView wording, Scroll tab list backward/forward, set from code-behind so the shared template stays independent of the view model. The two keys are added to all 60 language files. These are accessibility names only; nothing visible changes.Verification
TabControlFocusGuard.cslinked in, traversal is symmetric in every case: chevrons hidden, chevrons visible and focusable, and a nestedTabControl.dotnet format whitespaceandstyleboth exit 0;Verify-Translations.ps1and the boundary check pass;UniGetUI.Core.LanguageEngine.Testspasses (298/298).Closes #5543