diff --git a/app/assets/stylesheets/partials/_search.scss b/app/assets/stylesheets/partials/_search.scss index ee25cfa9..bc2f517f 100644 --- a/app/assets/stylesheets/partials/_search.scss +++ b/app/assets/stylesheets/partials/_search.scss @@ -9,7 +9,9 @@ padding: 2.4rem 2rem 1rem 2.4rem; details { - margin-top: 1rem; + &:first-of-type { + margin-top: 1rem; + } .field-container { margin-top: 1rem; @@ -78,16 +80,16 @@ #geobox-search-panel, #geodistance-search-panel { - label::after { - color: $red-muted; - content: '*'; - } .geo-label, - .geo-desc { + .geo-desc, + .hint { display: block; + color: $black; + } + .geo-label { + font-weight: $fw-bold; } .geo-desc { - font-size: $fs-xsmall; margin-bottom: 2rem; } #maxLat-desc, diff --git a/app/javascript/search_form.js b/app/javascript/search_form.js index c11cb8a6..2521876f 100644 --- a/app/javascript/search_form.js +++ b/app/javascript/search_form.js @@ -40,7 +40,7 @@ function disableGeobox() { field.setAttribute('aria-required', false); }); geobox_label.classList = 'closed'; - geobox_label.innerText = 'Bounding box search'; + geobox_label.innerText = 'Geospatial bounding box search'; }; function enableGeobox() { @@ -94,7 +94,7 @@ function enableGeodistance() { field.setAttribute('aria-required', true); }); geodistance_label.classList = 'open'; - geodistance_label.innerText = 'Close geospatial distance search'; + geodistance_label.innerText = 'Close distance search'; }; diff --git a/app/views/search/_form.html.erb b/app/views/search/_form.html.erb index fa35c0ea..9f9db14a 100644 --- a/app/views/search/_form.html.erb +++ b/app/views/search/_form.html.erb @@ -15,7 +15,7 @@ if params[:advanced] == "true" search_required = false end -geobox_label = "Bounding box search" +geobox_label = "Geospatial bounding box search" geobox_label_class = "closed" if params[:geobox] == "true" geobox_label = "Close bounding box search" @@ -27,7 +27,7 @@ end geodistance_label = "Geospatial distance search" geodistance_label_class = "closed" if params[:geodistance] == "true" - geodistance_label = "Close geospatial distance search" + geodistance_label = "Close distance search" geodistance_label_class = "open" geodistance_required = true search_required = false @@ -50,6 +50,7 @@ end
Search within a geospatial bounding box +

All fields in this section are required

@@ -72,9 +74,10 @@ end class="field field-text <%= "required" if geobox_required %>" id="geobox-minLatitude" name="geoboxMinLatitude" value="<%= params[:geoboxMinLatitude] %>" <%= 'required="required" aria-required="true"' if geobox_required %> - aria-describedby="minLat-desc" placeholder="E.g., 41.239083"> + aria-describedby="minLat-desc"> - A decimal between -90.0 and 90.0 (Southern hemisphere is negative) + A decimal between -90.0 and 90.0 (Ex: 41.239083) + Southern hemisphere is negative
@@ -85,9 +88,10 @@ end class="field field-text <%= "required" if geobox_required %>" id="geobox-maxLongitude" name="geoboxMaxLongitude" value="<%= params[:geoboxMaxLongitude] %>" <%= 'required="required" aria-required="true"' if geobox_required %> - aria-describedby="maxLong-desc" placeholder="E.g., -69.928713"> + aria-describedby="maxLong-desc"> - A decimal between -180.0 and 180.0 (Western hemisphere is negative) + A decimal between -180.0 and 180.0 (Ex: -69.928713) + Western hemisphere is negative
@@ -100,7 +104,8 @@ end <%= 'required="required" aria-required="true"' if geobox_required %> aria-describedby="maxLat-desc" placeholder="e.g., 42.886759"> - A decimal between -90.0 and 90.0 (Southern hemisphere is negative) + A decimal between -90.0 and 90.0 + Southern hemisphere is negative
@@ -113,6 +118,7 @@ end
Search within a distance of a geographic point +

All fields in this section are required

@@ -121,9 +127,10 @@ end id="geodistance-latitude" name="geodistanceLatitude" value="<%= params[:geodistanceLatitude] %>" aria-describedby="lat-desc" <%= 'required="required" aria-required="true"' if geodistance_required %> - aria-describedby="lat-desc" placeholder="E.g., 42.279594"> + aria-describedby="lat-desc"> - A decimal between -90.0 and 90.0 (Southern hemisphere is negative) + A decimal between -90.0 and 90.0 (Ex: 42.279594) + Southern hemisphere is negative
@@ -133,9 +140,10 @@ end id="geodistance-longitude" name="geodistanceLongitude" value="<%= params[:geodistanceLongitude] %>" aria-describedby="long-desc" <%= 'required="required" aria-required="true"' if geodistance_required %> - aria-describedby="long-desc" placeholder="E.g., -83.732124"> + aria-describedby="long-desc"> - A decimal between -180.0 and 180.0 (Western hemisphere is negative) + A decimal between -180.0 and 180.0 (Ex: -83.732124) + Western hemisphere is negative
@@ -146,7 +154,7 @@ end <%= 'required="required" aria-required="true"' if geodistance_required %> aria-describedby="distance-desc" placeholder="E.g., 160mi"> - Include units; e.g., '100km' or'50mi' (default unit is meters) + Distance is in meters by default; add other units if preferred (Ex: '100km' or'50mi')