From 9dfdd9ecc2a3bf4bad0aa9ad87c1f338eb375a22 Mon Sep 17 00:00:00 2001 From: Saurabh Kumar <theskumar@users.noreply.github.com> Date: Wed, 22 May 2024 11:57:05 +0530 Subject: [PATCH] Fix alignment of expand icon + make it accessible (#3917) Fixes #3889 --- hypha/static_src/javascript/all-submissions-table.js | 3 ++- .../sass/components/_all-submissions-table.scss | 10 ++++++++-- hypha/static_src/sass/components/_table.scss | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hypha/static_src/javascript/all-submissions-table.js b/hypha/static_src/javascript/all-submissions-table.js index 11934db6f..89526e705 100644 --- a/hypha/static_src/javascript/all-submissions-table.js +++ b/hypha/static_src/javascript/all-submissions-table.js @@ -4,11 +4,12 @@ let submission_arrow = document.createElement("span"); submission_arrow.classList.add("arrow"); - let submission_toggle = document.createElement("span"); + let submission_toggle = document.createElement("button"); submission_toggle.classList.add( "all-submissions-table__toggle", "js-toggle-submission" ); + submission_toggle.setAttribute("title", "Show submission details"); submission_toggle.appendChild(submission_arrow); // Add the toggle arrow before the submission titles. diff --git a/hypha/static_src/sass/components/_all-submissions-table.scss b/hypha/static_src/sass/components/_all-submissions-table.scss index c2af035df..2c3aeb621 100644 --- a/hypha/static_src/sass/components/_all-submissions-table.scss +++ b/hypha/static_src/sass/components/_all-submissions-table.scss @@ -161,7 +161,6 @@ @include triangle(right, $color--primary, 6px); position: relative; display: inline-block; - margin-inline-end: 10px; transform: rotate(0); transition: transform $transition; @@ -245,7 +244,14 @@ } &__toggle { - padding: 5px 0 5px 5px; + padding: 0.5em; + margin-top: -0.5em; + cursor: pointer; + vertical-align: top; + + &:hover { + opacity: 0.7; + } } &__more { diff --git a/hypha/static_src/sass/components/_table.scss b/hypha/static_src/sass/components/_table.scss index a1ef76228..25e107e39 100644 --- a/hypha/static_src/sass/components/_table.scss +++ b/hypha/static_src/sass/components/_table.scss @@ -116,7 +116,7 @@ } &.title { - padding-inline-start: 20px; + padding-inline-start: 0.5em; } } } -- GitLab