From 15262c7d1a327c17c76a4a00d52ba60df565c946 Mon Sep 17 00:00:00 2001 From: Cesar Ferreyra-Mansilla Date: Thu, 18 Jul 2024 17:34:51 -0400 Subject: [PATCH] -refactor/accessibility: add alt text for images -refactor/accessibility: order tabIndex -fix: gosling panel padding bug --- src/App.css | 9 +++++++ src/App.tsx | 28 ++++++++++++++----- src/ui/ExportDropdown.tsx | 4 +-- src/ui/GenomeViewModal.tsx | 20 +++++++++++--- src/ui/VariantViewModal.tsx | 21 ++++++++++----- src/ui/trackData.ts | 54 ++++++++++++++++++------------------- 6 files changed, 90 insertions(+), 46 deletions(-) diff --git a/src/App.css b/src/App.css index ae8b1e00..5e882ddb 100644 --- a/src/App.css +++ b/src/App.css @@ -492,12 +492,17 @@ a:hover { cursor: pointer; z-index: 998; opacity: 0.5; + border: none; } .move-to-top-btn:hover { opacity: 1; } +.move-to-top-btn:focus-visible { + outline-offset: 2px; +} + .interaction-toggle-button { z-index: 999; cursor: pointer; @@ -905,6 +910,10 @@ a:hover { border: 1px solid #d3d3d3; } + .navigation-button:focus-visible { + outline-offset: -1px; + } + .navigation-button:hover:not(:disabled) { background-color: #ebebeb; } diff --git a/src/App.tsx b/src/App.tsx index 3ba484ff..2142ecac 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -319,7 +319,7 @@ function App(props: RouteComponentProps) { window.addEventListener( 'resize', debounce(() => { - setVisPanelWidth(window.innerWidth - VIS_PADDING.left * 2); + setVisPanelWidth(window.innerWidth - (isMinimalMode ? 10 : VIS_PADDING.left * 2)); }, 500) ); @@ -553,10 +553,12 @@ function App(props: RouteComponentProps) { const offset = genomeViewHeight + (isMinimalMode ? 100 : 40) - 2; // Infer the tracks shown - const tracksShown: Track[] = ['driver', 'ideogram', 'gene', 'sv']; - if (demo.cnv) tracksShown.push('cnv', 'gain', 'loh'); + const tracksShown: Track[] = ['ideogram', 'driver', 'gene']; if (demo.vcf && demo.vcfIndex) tracksShown.push('mutation'); if (demo.vcf2 && demo.vcf2Index) tracksShown.push('indel'); + if (demo.cnv) tracksShown.push('cnv', 'gain', 'loh'); + // Pushing this after the others to match order of tracks in UI + tracksShown.push('sv'); if (selectedSvId !== '') tracksShown.push('sequence'); if (demo.bam && demo.bai && selectedSvId !== '') tracksShown.push('coverage', 'alignment'); const HEIGHTS_OF_TRACKS_SHOWN = TRACK_DATA.filter(d => tracksShown.includes(d.type)); @@ -584,7 +586,7 @@ function App(props: RouteComponentProps) { return (
{isMinimalMode && ( diff --git a/src/ui/ExportDropdown.tsx b/src/ui/ExportDropdown.tsx index 6bdbbcf4..27aedde4 100644 --- a/src/ui/ExportDropdown.tsx +++ b/src/ui/ExportDropdown.tsx @@ -9,7 +9,7 @@ type ExportButtonProps = { const ExportButton = ({ title, icon }: ExportButtonProps) => { return ( - + {title} {ICONS[icon].path.map(p => ( @@ -32,7 +32,7 @@ export const ExportDropdown = ({ gosRef, currentSpec }: ExportDropdownProps) => onClick={() => setIsOpen(!isOpen)} aria-expanded={isOpen} > - Export Triangle Down diff --git a/src/ui/GenomeViewModal.tsx b/src/ui/GenomeViewModal.tsx index 87b7a533..9c4a3d90 100644 --- a/src/ui/GenomeViewModal.tsx +++ b/src/ui/GenomeViewModal.tsx @@ -28,7 +28,10 @@ export const GenomeViewModal = () => {
- + Grab cursor over blue, selected region in Genome View.

Click and drag - the blue selection brush to highlight regions of @@ -38,7 +41,10 @@ export const GenomeViewModal = () => {


- + Move cursor over edge of blue, selected region in Genome View.

Click and drag - the edges of the selection brush to resize it. @@ -47,7 +53,10 @@ export const GenomeViewModal = () => {


- + Structural Variant detail pop up in Genome View.

Hover - over a structural variant to see detailed information. @@ -56,7 +65,10 @@ export const GenomeViewModal = () => {


- + Highlighted structural variant strand in Genome View.

Click - on a structural variant to inspect breakpoints in other diff --git a/src/ui/VariantViewModal.tsx b/src/ui/VariantViewModal.tsx index 144a7aea..470889bb 100644 --- a/src/ui/VariantViewModal.tsx +++ b/src/ui/VariantViewModal.tsx @@ -31,7 +31,7 @@ export const VariantViewModal = () => {


- + Variant View tracks.

A structural variant (SV) may leave a footprint on the copy @@ -46,7 +46,10 @@ export const VariantViewModal = () => {


- + Black vertical line above Variant View tracks.

The black vertical line indicates region in focus. @@ -55,7 +58,10 @@ export const VariantViewModal = () => {


- + Structural Variant detail pop up in Structural Variant track.

Hover - over a structural variant to see detailed information. @@ -64,7 +70,10 @@ export const VariantViewModal = () => {


- + Structural Variant highlighted in Structural Variant track.

Click - on a structural variant to show its breakpoints in the @@ -77,7 +86,7 @@ export const VariantViewModal = () => {


- + Zoom in and out buttons.

Zoom in and out - on chromosomal regions by clicking the{' '} @@ -94,7 +103,7 @@ export const VariantViewModal = () => {


- + Pan left and right buttons.

Pan left and right - around the current region by clicking the{' '} diff --git a/src/ui/trackData.ts b/src/ui/trackData.ts index f5625135..3c2578c1 100644 --- a/src/ui/trackData.ts +++ b/src/ui/trackData.ts @@ -61,14 +61,14 @@ export const getTrackData = (

Interpretation


- + Chromosome bands on Ideogram track.

Black stripes - indicate chromosome bands (cytobands) obtained from chromosome staining viewing under microscope.


- + Chromosome centromeres on Ideogram track.

Red Triangles - represent chromosome centromeres.

@@ -88,7 +88,7 @@ export const getTrackData = (
- + Bi-allelic gene loss on Putative Driver track.

Circle with a dot - denotes bi-allelic gene loss.

Circle without a dot - denotes one mutation in gene.

@@ -96,7 +96,7 @@ export const getTrackData = (

- + Driver mutation names on Genome View.

Driver mutations are also annotated by name in the genome view.

@@ -112,7 +112,7 @@ export const getTrackData = (

Interactions


- + Putative Driver track annotation details pop up.

Hover - over driver variants to see annotation details.

@@ -130,7 +130,7 @@ export const getTrackData = (

Interpretation


- + Gene Annotation track.

Arrows - represent genes.

Direction - denotes gene strand.

@@ -138,7 +138,7 @@ export const getTrackData = (

- + Exons on the Gene Annotation track.

Thicker lines - represent Exons.

@@ -148,14 +148,14 @@ export const getTrackData = (

Interactions


- + Gene Annotation track at low magnification.
-

Zoom out - only selected genes are shown sampling info.

+

Zoom out - to see only selected genes sampling info.


- + Gene Annotation track at high magnification.

Zoom in - to a smaller region to see all genes in that region.

@@ -173,7 +173,7 @@ export const getTrackData = (

Interpretation


- + Point Mutation track y-axis.

Y-axis shows the distance (in kb) between adjacent point mutations, on a logarithmic scale.

@@ -187,7 +187,7 @@ export const getTrackData = (

Interactions


- + Point Mutation track at high magnification.

Zoom in - to reveal more point mutations. @@ -196,7 +196,7 @@ export const getTrackData = (


- + Point Mutation track details pop up.

Hover - over a point mutation to see details.

@@ -220,7 +220,7 @@ export const getTrackData = (

- + Indel track.

Orange lines - mark insertions.

Green lines - mark deletions.

@@ -228,7 +228,7 @@ export const getTrackData = (

- + Indel track.

When showing large chromosomal regions, Chromoscope selects 500 indels in each visible tile (see documentation on sampling).

@@ -239,9 +239,9 @@ export const getTrackData = (

Interactions


- + Indel track details pop up.
-

Hover - on a deletion to see the deleted sequence.

+

Hover - on an insertion or deletion to see details.

@@ -257,7 +257,7 @@ export const getTrackData = (

Interpretation


- + Copy Number Variants track.

Thick gray lines - represent copy number profiles.

Y-axis - represents the number of chromosome copies.

@@ -265,7 +265,7 @@ export const getTrackData = (

- + Copy Number Variants track.

Copy number variants often coincide with structural variants.

@@ -275,7 +275,7 @@ export const getTrackData = (

Interactions


- + Copy number segment details pop up.

Hover - over the copy number segment to see the number of copies of each chromosomal regions. @@ -296,14 +296,14 @@ export const getTrackData = (

Interpretation


- + Gain track.

Gains are declared in chromosomal regions where total number of copies exceeds 5.


- + Region with Gains in Genome View.

Regions with gains are marked in blue on both Genome and Variant Views.

@@ -325,14 +325,14 @@ export const getTrackData = (

LOH is declared in regions where a chromosome copy from one of the parents was entirely lost (minor copy number of 0).

- + Loss of Heterozygosity region in Variant View.

Regions with LOH are marked in coral in Variant View.


- + Loss of Heterozygosity region in Genome View.

Regions with LOH are marked in coral in Genome View.

@@ -350,7 +350,7 @@ export const getTrackData = (

Interpretation


- + Structural Variants track.

Arches - represent structural variants (SVs).

Colors - denote different types of SVs.

@@ -361,14 +361,14 @@ export const getTrackData = (

Interactions


- + Structural Variants track with event highlighted.

Click - on an SV to show its breakpoints in the read view.


- + Event details pop up on Structural Variants track.

Hover - over a SV to see more information about each event.