Skip to content

Commit

Permalink
feat: improve accessibility (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeopJr authored May 24, 2024
1 parent edfbfd2 commit 875ff31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,3 @@ jobs:
manifest-path: "data/dev.geopjr.Collision.json"
cache-key: flatpak-builder-${{ github.sha }}
arch: ${{ matrix.arch }}
repository-name: flathub-beta
repository-url: https://flathub.org/beta-repo/flathub-beta.flatpakrepo
2 changes: 1 addition & 1 deletion data/dev.geopjr.Collision.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app-id": "dev.geopjr.Collision",
"runtime": "org.gnome.Platform",
"runtime-version": "46beta",
"runtime-version": "46",
"sdk": "org.gnome.Sdk",
"command": "collision",
"finish-args": [
Expand Down
10 changes: 9 additions & 1 deletion src/collision/window.cr
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ module Collision
@verifyFeedback.icon_name = Collision::Feedback.icon(result)
@verifyFeedback.add_css_class(classes[:add])
@verifyFeedback.remove_css_class(classes[:remove])
@verifyTextView.tooltip_text = Collision::Feedback.title(result)

feedback_result = Collision::Feedback.title(result)
@verifyTextView.tooltip_text = feedback_result
{% if compare_versions("#{Gtk::MAJOR_VERSION}.#{Gtk::MINOR_VERSION}.#{Gtk::MICRO_VERSION}", "4.14.0") >= 0 %}
@verifyTextView.announce(feedback_result, Gtk::AccessibleAnnouncementPriority::High)
{% end %}
end

# We want to only check the file contents
Expand Down Expand Up @@ -167,6 +172,9 @@ module Collision
@compareBtn.add_css_class(classes[:add])
@compareBtn.remove_css_class(classes[:remove])
@compareBtnImage.tooltip_text = title
{% if compare_versions("#{Gtk::MAJOR_VERSION}.#{Gtk::MINOR_VERSION}.#{Gtk::MICRO_VERSION}", "4.14.0") >= 0 %}
@compareBtn.announce(title, Gtk::AccessibleAnnouncementPriority::High)
{% end %}

false
end
Expand Down

0 comments on commit 875ff31

Please sign in to comment.