From 71f391c8e85ef9828f9f83dce874a47fc3c74881 Mon Sep 17 00:00:00 2001 From: Moyasee Date: Sat, 4 Oct 2025 20:22:08 +0300 Subject: [PATCH] fix: refactoring function, using proper attributes and extracted ternary operation --- .../src/pages/game-details/game-details-content.tsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/pages/game-details/game-details-content.tsx b/src/renderer/src/pages/game-details/game-details-content.tsx index 7cf67e4c..13a41121 100644 --- a/src/renderer/src/pages/game-details/game-details-content.tsx +++ b/src/renderer/src/pages/game-details/game-details-content.tsx @@ -66,8 +66,10 @@ const processMediaElements = (document: Document) => { // Helper function to get score color class for select element const getSelectScoreColorClass = (score: number): string => { if (score >= 0 && score <= 3) return "game-details__review-score-select--red"; - if (score >= 4 && score <= 7) return "game-details__review-score-select--yellow"; - if (score >= 8 && score <= 10) return "game-details__review-score-select--green"; + if (score >= 4 && score <= 7) + return "game-details__review-score-select--yellow"; + if (score >= 8 && score <= 10) + return "game-details__review-score-select--green"; return ""; }; @@ -637,6 +639,9 @@ export function GameDetailsContent() { editor?.commands.focus(); } }} + role="button" + tabIndex={0} + aria-label="Click to focus review editor" > @@ -649,7 +654,9 @@ export function GameDetailsContent() {