Skip to content

added aria live to in-game log, and added aria label to icon pattern … #6948

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cljs/nr/gameboard/log.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@
(into [:div.messages {:class [(when (:replay @game-state)
"panel-bottom")]
:on-mouse-over #(card-preview-mouse-over % zoom-channel)
:on-mouse-out #(card-preview-mouse-out % zoom-channel)}]
:on-mouse-out #(card-preview-mouse-out % zoom-channel)
:aria-live "polite"}]
(map
(fn [{:keys [user text timestamp]}]
^{:key timestamp}
Expand Down
2 changes: 1 addition & 1 deletion src/cljs/nr/utils.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
(def icon-patterns
"A sequence of icon pattern pairs consisting of an regex, used to match icon
codes, and the span fragment that should replace it"
(letfn [(span-of [icon] [:span {:class (str "anr-icon " icon) :title (str " " icon)}])
(letfn [(span-of [icon] [:span {:class (str "anr-icon " icon) :title (str " " icon) :aria-label (str icon) :role (str "img") }])
(regex-of [icon-code] (re-pattern (str "(?i)" (regex-escape icon-code))))]
(->> {"[credit]" "credit"
"[credits]" "credit"
Expand Down