Skip to content

Make custom text hyperlinks keyboard and screen-reader accessible - #5461

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/5458-accessible-hyperlinks
Sep 30, 2026
Merged

Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/5458-accessible-hyperlinks

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request introduces a new reusable HyperlinkText control to standardize hyperlink-like text behavior throughout the application. The new control handles pointer and keyboard activation, accessibility, and visual styling, replacing previous ad-hoc implementations. Several usages of selectable or clickable text have been refactored to use HyperlinkText, improving code clarity and accessibility.

Introduction of HyperlinkText control:

  • Added a new HyperlinkText class in src/UniGetUI.Avalonia/Views/Controls/HyperlinkText.cs, providing a selectable, keyboard-accessible, and stylized hyperlink text control, including an automation peer for accessibility support.

Refactoring usages to use HyperlinkText:

  • Refactored PackageDetailsWindow.axaml.cs to use HyperlinkText instead of SelectableTextBlock for links, removing custom pointer handling logic and attaching activation to the new control's Activated event.
  • Updated TelemetryDialog.axaml.cs to use HyperlinkText in place of a plain TextBlock, simplifying activation and improving accessibility.
  • Updated General.axaml.cs to use HyperlinkText for the "Become a translator" link, replacing manual pointer event handling with the new control.

Code cleanup:

  • Removed unnecessary using directives and manual accessibility property assignments that are now handled by HyperlinkText. [1] [2]

These changes improve code maintainability, accessibility, and consistency for hyperlink-like UI elements.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused accessibility refactor is consistent across all affected call sites and has no identified correctness issues.

Review effort: Balanced
Findings: None

What changed in this PR

Introduces a reusable, accessible hyperlink-style text control and replaces ad-hoc link implementations.

Changes:

  • Adds keyboard, pointer, and screen-reader activation support.
  • Standardizes hyperlink styling and behavior.
  • Refactors three existing links to use the control.
File Description
General.axaml.cs Uses HyperlinkText for the translator link.
TelemetryDialog.axaml.cs Uses HyperlinkText for the legal-details link.
PackageDetailsWindow.axaml.cs Replaces custom hyperlink activation logic.
HyperlinkText.cs Implements reusable hyperlink behavior and automation support.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@randy-but-a-ro randy-but-a-ro Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉

Integration Details
{
	"deliveryId": "f7815bb0-bcf7-11f1-80d9-9195072ac7ac",
	"headSha": "2f65795379adbe29d28d248f9bb4a360dabd08ef",
	"reviewer": "copilot-pull-request-reviewer[bot]"
}

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit f01fa7a into main Sep 30, 2026
6 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/5458-accessible-hyperlinks branch September 30, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Custom text-based hyperlinks are not fully keyboard and screen-reader accessible

2 participants