Skip to content

Commit

Permalink
Merge pull request #1026 from nwanduka/patch-9
Browse files Browse the repository at this point in the history
Added labels to form elements
  • Loading branch information
birm authored Aug 20, 2024
2 parents c70d646 + aa79a09 commit 7c488a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions apps/segment/segment.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ async function initUIcomponents() {
<form class="form-style" action="#">
<ul>
<li>
<label align="left"> Name: </label>
<label for="name" align="left"> Name: </label>
<input name="name" id="name" type="text" required />
<span> Name of the model </span>
</li>
<li>
<label align="left"> Input patch size: </label>
<label for="imageSize" align="left"> Input patch size: </label>
<input name="imageSize" id="imageSize" type="number" required />
<span> The image size on which the model is trained (y x y)</span>
</li>
Expand All @@ -100,8 +100,8 @@ async function initUIcomponents() {
<label class="switch"><input type="checkbox" id="togBtn"><div class="slider"></div></label> <br> <br>
<div class="checkfalse"><div>Select model.json first followed by the weight binaries.</div> <br>
<input name="filesupload" id="modelupload" type="file" required/><br><br>
<input name="filesupload" id="weightsupload" type="file" multiple="" required/> <br> <br> </div>
<input name="filesupload" id="modelupload" type="file" aria-label="Upload model" required/><br><br>
<input name="filesupload" id="weightsupload" type="file" multiple="" aria-label="Upload weights" required/> <br> <br> </div>
<div class="checktrue" > URL to the ModelAndWeightsConfig JSON describing the model. <br> <br>
<label align-"left"> Enter the URL: </label> <input type="url" name="url" id="url" required> <br><br></div>
<button id="submit">Upload</button> <span id="status"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@
this.zoomIn.classList.add('material-icons');
this.zoomIn.classList.add('md-24');
this.zoomIn.classList.add('zoom');
this.zoomIn.textContent = 'add';
this.zoomIn.textContent = 'zoom_in';

// zoom out
this.zoomOut = document.createElement( 'div' );
this.zoomOut.classList.add('material-icons');
this.zoomOut.classList.add('md-24');
this.zoomOut.classList.add('zoom');
this.zoomOut.textContent = 'remove';
this.zoomOut.textContent = 'zoom_out';

// indicator
this.idx = document.createElement( 'div' );
Expand All @@ -277,6 +277,7 @@
this.ip = document.createElement('input');
this.ip.type='text';
this.ip.classList.add('ip');
this.ip.setAttribute('aria-label', 'Zoom level');
this.idx.addEventListener('click', function(e){
// set image zoom value to input
let value = this.txt.textContent;
Expand Down Expand Up @@ -306,6 +307,7 @@
// range
this.range = $.makeNeutralElement( 'input' );
this.range.type = 'range';
this.range.setAttribute('aria-label', 'Zoom level range');

this.element.appendChild(this.zoomIn);
this.element.appendChild(this.range);
Expand Down

0 comments on commit 7c488a1

Please sign in to comment.