Skip to content

Commit

Permalink
added aria-label to toolbar icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nwanduka authored Jul 11, 2024
1 parent a9058bd commit 99499f3
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions apps/viewer/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ async function initUIcomponents() {
title: 'Home',
type: 'btn', // btn/check/dropdown
value: 'home',
ariaLabel: 'Home',
callback: goHome,
});
}
Expand All @@ -447,6 +448,7 @@ async function initUIcomponents() {
icon: 'create', // material icons' name
title: 'Draw',
type: 'multistates',
ariaLabel: 'Draw',
callback: draw,
});

Expand All @@ -456,6 +458,7 @@ async function initUIcomponents() {
title: 'Preset Labels',
type: 'check',
value: 'prelabels',
ariaLabel: 'Preset labels',
callback: drawLabel,
});

Expand All @@ -466,6 +469,7 @@ async function initUIcomponents() {
title: 'Magnifier',
type: 'dropdown',
value: 'magn',
ariaLabel: 'Magnifier',
dropdownList: [
{
value: 0.5,
Expand All @@ -491,17 +495,20 @@ async function initUIcomponents() {
title: 'Measurement',
type: 'dropdown',
value: 'measure',
ariaLabel: 'Measurement',
dropdownList: [
{
value: 'straight',
title: 'straight',
icon: 'straighten',
ariaLabel: 'straight',
checked: true,
},
{
value: 'coordinate',
title: 'coordinate',
icon: 'square_foot',
ariaLabel: 'coordinate',
},
],
callback: toggleMeasurement,
Expand All @@ -514,6 +521,7 @@ async function initUIcomponents() {
title: 'Download Selection',
type: 'check',
value: 'download',
ariaLabel: 'Download selection',
callback: toggleDownloadSelection,
});
// enhance
Expand All @@ -523,27 +531,32 @@ async function initUIcomponents() {
title: 'Enhance',
type: 'dropdown',
value: 'Enhance',
ariaLabel: 'Enhance',
dropdownList: [
{
value: 'Histogram Eq',
title: 'Histogram Equalization',
icon: 'leaderboard',
ariaLabel: 'Histogram equalization',
checked: true,
},
{
value: 'Edge',
title: 'Edge',
icon: 'show_chart',
ariaLabel: 'Edge',
},
{
value: 'Sharpen',
title: 'Sharpen',
icon: 'change_history',
ariaLabel: 'Sharpen',
},
{
value: 'Custom',
title: 'Custom',
icon: 'api',
ariaLabel: 'Custom',
},
],
callback: enhance,
Expand All @@ -556,6 +569,7 @@ async function initUIcomponents() {
title: 'Share View',
type: 'btn',
value: 'share',
ariaLabel: 'Share',
callback: shareURL,
});
}
Expand All @@ -566,6 +580,7 @@ async function initUIcomponents() {
title: 'Side By Side Viewer',
value: 'dbviewers',
type: 'check',
ariaLabel: 'Side by side viewer',
callback: toggleViewerMode,
});
// heatmap
Expand All @@ -575,6 +590,7 @@ async function initUIcomponents() {
title: 'Heat Map',
value: 'heatmap',
type: 'btn',
ariaLabel: 'Heat map',
callback: openHeatmap,
});
subToolsOpt.push({
Expand All @@ -583,6 +599,7 @@ async function initUIcomponents() {
title: 'Labeling',
value: 'labeling',
type: 'btn',
ariaLabel: 'Labeling',
callback: function() {
window.location.href = `../labeling/labeling.html${window.location.search}`;
},
Expand All @@ -593,6 +610,7 @@ async function initUIcomponents() {
type: 'btn',
value: 'rect',
title: 'Segment',
ariaLabel: 'Segment',
callback: function() {
if (window.location.search.length > 0) {
window.location.href =
Expand All @@ -608,6 +626,7 @@ async function initUIcomponents() {
type: 'btn',
value: 'rect',
title: 'Predict',
ariaLabel: 'Predict',
callback: function() {
if (window.location.search.length > 0) {
window.location.href = '../model/model.html' + window.location.search;
Expand All @@ -626,6 +645,7 @@ async function initUIcomponents() {
title: 'Download Marks',
type: 'btn',
value: 'download',
ariaLabel: 'Download marks',
callback: Store.prototype.DownloadMarksToFile,
});
subToolsOpt.push({
Expand All @@ -634,6 +654,7 @@ async function initUIcomponents() {
title: 'Load Marks',
type: 'btn',
value: 'upload',
ariaLabel: 'Load marks',
callback: Store.prototype.LoadMarksFromFile,
});
}
Expand All @@ -647,6 +668,7 @@ async function initUIcomponents() {
title: 'has reviewed',
type: 'btn',
value: 'review',
ariaLabel: 'Has reviewed',
callback: updateSlideView,
});
}
Expand All @@ -657,6 +679,7 @@ async function initUIcomponents() {
title: 'Slide Capture',
type: 'btn',
value: 'slCap',
ariaLabel: 'Slide capture',
callback: captureSlide,
});
subToolsOpt.push({
Expand All @@ -665,6 +688,7 @@ async function initUIcomponents() {
title: 'Tutorial',
value: 'tutorial',
type: 'btn',
ariaLabel: 'Tutorial',
callback: function() {
tour.init();
tour.start(true);
Expand Down

0 comments on commit 99499f3

Please sign in to comment.