Skip to content

Commit

Permalink
Fix chrome console errors about bad label elements
Browse files Browse the repository at this point in the history
Chrome now complains about label elements with missing or incorrect "for"
attributes. See issue #505.

I found four <label> elements in chm.html that were semantically labels,
but not labels in the strict HTML sense as referring to a specific form
input element.

I changed them to plain <span> elements.  Since we weren't formatted them
any differently from plain elements, I didn't add a class field that we
could use as a css selector in the future.  I could easily be convinced to
add one.
  • Loading branch information
bmbroom authored and ChrisWakefield committed Jun 19, 2024
1 parent 872c98a commit 44c5c1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions NGCHM/WebContent/chm.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<div id="detail_buttons" class="divTable hide" data-show-on-load>
<div class="divRow">
<div id="MapRow">
<label for="mapName">Map name:</label>
<span>Map name:</span>
<div class="divLeft" id="mapName"
data-title='Map Name'
data-intro="The map's name. Hover over the name to see the map's caption (if provided)."
Expand All @@ -50,7 +50,7 @@
</div>
<div class="divRow">
<div id="SelectionsRow">
<label>Search:</label>
<span>Search:</span>
<select name="search_on" id="search_on" class='srchSelect'
data-title='Search Target'
data-intro='Select whether to search on map labels or a specific covariate.'
Expand Down Expand Up @@ -274,7 +274,7 @@ <h3 style="margin-bottom:0px;">Font &amp; Paper Options:</h3>
<option value="A3">Ledger/Tabloid (11 x 17 inches)</option>
<option value="A4">A4 International (210 x 297 mm)</option>
</select>
<label>Orientation:</label>
<span>Orientation:</span>
<div>
<input id="pdfInputPortrait" type="radio" name="orientation" value="portrait"> Portrait
<input id="pdfInputLandscape" type="radio" name="orientation" value="Landscape" checked> Landscape
Expand Down Expand Up @@ -367,7 +367,7 @@ <h3 style="margin-bottom:0px;">Font &amp; Paper Options:</h3>
<!-- WIDGET INCLUDE -->
<div class="msgBoxTxt"></div>
<div class="msgBoxProgressDiv" style="display: none;">
<label>Progress:</label>
<span>Progress:</span>
<progress class="msgBoxProgressBar"></progress>
</div>
</div>
Expand Down

0 comments on commit 44c5c1c

Please sign in to comment.