Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

WV-2809 eslint (#5652)

Patrick Moulden57c8e36e6ede
diff --git a/web/.eslintrc b/web/.eslintrc
index 2b60e1152..f28cdc85e 100644
--- a/web/.eslintrc
+++ b/web/.eslintrc
@@ -99,14 +99,6 @@
// Import rules overrides
"import/no-cycle": "warn",
// Accesibility rules overrides
- "jsx-a11y/no-noninteractive-tabindex": "off", // 2 errors across 2 files
- "jsx-a11y/no-noninteractive-element-interactions": "off", // 5 errors across 5 files
- "jsx-a11y/anchor-has-content": "off", // 1 error across 1 files
- "jsx-a11y/control-has-associated-label": "off", // 1 error across 1 files
- "jsx-a11y/anchor-is-valid": "off", // 24 errors across 13 files
- "jsx-a11y/label-has-associated-control": "off", // 5 errors across 4 files
- "jsx-a11y/alt-text": "off", // 15 errors across 10 files
- "jsx-a11y/mouse-events-have-key-events": "off", // 7 errors across 4 files
"jsx-a11y/no-static-element-interactions": "off", // 71 errors across 39 files
"jsx-a11y/click-events-have-key-events": "off", // 70 errors across 39 files
// React rules overrides
diff --git a/web/js/components/animation-widget/gif-button.js b/web/js/components/animation-widget/gif-button.js
index 594479615..f8aa8d82d 100644
--- a/web/js/components/animation-widget/gif-button.js
+++ b/web/js/components/animation-widget/gif-button.js
@@ -93,7 +93,8 @@ function GifButton(props) {
return (
<>
- <a
+ <button
+ type="button"
id="create-gif-button"
aria-label={labelText}
className={gifDisabled ? 'wv-icon-case no-drag disabled' : 'wv-icon-case no-drag'}
@@ -111,7 +112,7 @@ function GifButton(props) {
>
{showWarning ? warningMessage : labelText}
</UncontrolledTooltip>
- </a>
+ </button>
{isGifActive && <GifContainer onClose={onCloseGif} />}
</>
);
diff --git a/web/js/components/animation-widget/gif-post-creation.js b/web/js/components/animation-widget/gif-post-creation.js
index d6db00523..a8c22a27c 100644
--- a/web/js/components/animation-widget/gif-post-creation.js
+++ b/web/js/components/animation-widget/gif-post-creation.js
@@ -61,7 +61,7 @@ export default class GifResults extends Component {
<ModalHeader close={closeBtn}>GIF Results</ModalHeader>
<ModalBody>
<div className="gif-results-dialog-case clearfix">
- <img src={blobURL} width={imgElWidth} height={imgElHeight} />
+ <img alt="GIF preview" src={blobURL} width={imgElWidth} height={imgElHeight} />
<div
className="gif-results-dialog"
style={{ minHeight: 210 }}
diff --git a/web/js/components/animation-widget/loop-button.js b/web/js/components/animation-widget/loop-button.js
index 35b3593b7..4a67c08b8 100644
--- a/web/js/components/animation-widget/loop-button.js
+++ b/web/js/components/animation-widget/loop-button.js
@@ -12,7 +12,8 @@ function LoopButton({ looping, onLoop, isMobile }) {
const labelText = looping ? 'Disable animation loop' : 'Enable animation loop';
const buttonId = 'loop-button';
return (
- <a
+ <button
+ type="button"
id={buttonId}
aria-label={labelText}
className={
@@ -33,7 +34,7 @@ function LoopButton({ looping, onLoop, isMobile }) {
</UncontrolledTooltip>
)}
<FontAwesomeIcon icon="retweet" className="wv-animation-widget-icon" />
- </a>
+ </button>
);
}
diff --git a/web/js/components/animation-widget/play-button.js b/web/js/components/animation-widget/play-button.js
index c7b218c5b..3a0d51a2f 100644
--- a/web/js/components/animation-widget/play-button.js
+++ b/web/js/components/animation-widget/play-button.js
@@ -18,7 +18,8 @@ function PlayButton({
const onClick = isDisabled ? () => {} : playing ? pause : play;
return (
- <a
+ <button
+ type="button"
id={buttonId}
aria-label={labelText}
className={`wv-anim-play-case wv-icon-case no-drag ${isDisabled ? 'disabled' : ''}`}
@@ -36,7 +37,7 @@ function PlayButton({
{playing
? <FontAwesomeIcon icon="pause" className="wv-animation-widget-icon" />
: <FontAwesomeIcon icon="play" className="wv-animation-widget-icon" />}
- </a>
+ </button>
);
}
diff --git a/web/js/components/compare/alert.js b/web/js/components/compare/alert.js
index 4c046f071..d23f4f179 100644
--- a/web/js/components/compare/alert.js
+++ b/web/js/components/compare/alert.js
@@ -10,7 +10,7 @@ function CompareAlertModalBody() {
Select the respective tab (A or B) in order to update the layers
and date of that state.
</p>
- <img src="images/ab-tabs.png" />
+ <img alt="A-B tabs" src="images/ab-tabs.png" />
</li>
<li className="compare-dialog-list-item">
<p>
@@ -18,14 +18,14 @@ function CompareAlertModalBody() {
the deactivated time slider to activate that state and change the
date.
</p>
- <img src="images/ab-picks.png" />
+ <img alt="A-B picks" src="images/ab-picks.png" />
</li>
<li className="compare-dialog-list-item">
<p>
There are three compare modes. You can choose different modes
using the selection at the bottom of the layer list.
</p>
- <img src="images/ab-modes.png" />
+ <img alt="A-B modes" src="images/ab-modes.png" />
</li>
</ul>
</div>
diff --git a/web/js/components/compare/opacity-slider.js b/web/js/components/compare/opacity-slider.js
index 6b370ba3b..df1379883 100644
--- a/web/js/components/compare/opacity-slider.js
+++ b/web/js/components/compare/opacity-slider.js
@@ -48,12 +48,12 @@ function OpacitySlider ({
return (
<div id="ab-slider-case" className="ab-slider-case" style={caseStyle}>
- <label className="wv-slider-label left" style={labelStyle}>
+ <p className="wv-slider-label left" style={labelStyle}>
<h4 className="left">
<span>A</span>
<MonospaceDate date={dateAText} />
</h4>
- </label>
+ </p>
<div className="input-range">
<div className="range-tooltip">
{currentValue}
@@ -68,12 +68,12 @@ function OpacitySlider ({
style={{ '--value-percent': `${currentValue}%` }}
/>
</div>
- <label className="wv-slider-label right" style={labelStyle}>
+ <p className="wv-slider-label right" style={labelStyle}>
<h4 className="right">
<span>B</span>
<MonospaceDate date={dateBText} />
</h4>
- </label>
+ </p>
</div>
);
}
diff --git a/web/js/components/feature-alert/vector-alert-modal.js b/web/js/components/feature-alert/vector-alert-modal.js
index ed005146a..caa812c1a 100644
--- a/web/js/components/feature-alert/vector-alert-modal.js
+++ b/web/js/components/feature-alert/vector-alert-modal.js
@@ -50,7 +50,7 @@ function VectorAlertModalBody() {
</p>
</Col>
<Col>
- <img src="images/vector-alert.png" />
+ <img alt="Blue pointer icon" src="images/vector-alert.png" />
</Col>
</Row>
</Container>
diff --git a/web/js/components/layer/info/date-ranges.js b/web/js/components/layer/info/date-ranges.js
index d3157c7e4..b5bbd55b3 100644
--- a/web/js/components/layer/info/date-ranges.js
+++ b/web/js/components/layer/info/date-ranges.js
@@ -64,12 +64,17 @@ export default function DateRanges ({ layer }) {
<>
<sup
className="layer-date-ranges-button"
- onClick={() => {
- getDateRanges();
- setShowRanges(!showRanges);
- }}
>
- *View Dates
+ <button
+ type="button"
+ style={{ background: 'none', border: 'none', color: 'white' }}
+ onClick={() => {
+ getDateRanges();
+ setShowRanges(!showRanges);
+ }}
+ >
+ *View Dates
+ </button>
</sup>
<div
style={style}
diff --git a/web/js/components/layer/product-picker/browse/category-cell.js b/web/js/components/layer/product-picker/browse/category-cell.js
index d87a1863b..c9946f62f 100644
--- a/web/js/components/layer/product-picker/browse/category-cell.js
+++ b/web/js/components/layer/product-picker/browse/category-cell.js
@@ -33,13 +33,15 @@ function CategoryCell(props) {
<div className="category-background-cover" style={categoryBgImage}>
<div className="category-background-cover">
<h3>
- <a
+ <button
+ type="button"
+ style={{ border: 'none', textAlign: 'left' }}
className="layer-category-name"
alt={category.title}
onClick={() => drawMeasurements(category)}
>
{category.title}
- </a>
+ </button>
</h3>
<ul>
{category.measurements
@@ -71,12 +73,13 @@ function CategoryCell(props) {
/* eslint react/no-array-index-key: 1 */
key={category.id + index}
>
- <a
+ <button
+ type="button"
className="layer-category-name"
onClick={() => drawMeasurements(category)}
>
...
- </a>
+ </button>
</li>
) : (
<li
@@ -86,12 +89,13 @@ function CategoryCell(props) {
`layer-category-item-${category.id}-${current.id}`
}
>
- <a
+ <button
+ type="button"
className="layer-category-name"
onClick={() => drawMeasurements(category, current.id, index)}
>
{current.title}
- </a>
+ </button>
{' '}
</li>
);
diff --git a/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js b/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
index f26ed8d1b..9d1c3e8db 100644
--- a/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
+++ b/web/js/components/layer/product-picker/browse/measurement-metadata-detail.js
@@ -58,8 +58,10 @@ function MeasurementMetadataDetail (props) {
href={`images/layers/previews/${selectedProjection}/${l.id}.jpg`}
rel="noopener noreferrer"
target="_blank"
+ aria-label="View layer preview"
>
<img
+ alt="Layer preview"
className="img-fluid layer-preview"
src={`images/layers/previews/${selectedProjection}/${l.id}.jpg`}
/>
diff --git a/web/js/components/layer/product-picker/search/layer-metadata-detail.js b/web/js/components/layer/product-picker/search/layer-metadata-detail.js
index 46551eade..b0b80eb61 100644
--- a/web/js/components/layer/product-picker/search/layer-metadata-detail.js
+++ b/web/js/components/layer/product-picker/search/layer-metadata-detail.js
@@ -64,8 +64,8 @@ class LayerMetadataDetail extends React.Component {
{showPreviewImage
&& (
<div className="text-center">
- <a href={previewUrl} rel="noopener noreferrer" target="_blank">
- <img className="img-fluid layer-preview" src={previewUrl} />
+ <a href={previewUrl} rel="noopener noreferrer" target="_blank" aria-label="View layer preview">
+ <img alt="Layer Preview" className="img-fluid layer-preview" src={previewUrl} />
</a>
</div>
)}
diff --git a/web/js/components/layer/settings/imagery-search.js b/web/js/components/layer/settings/imagery-search.js
index 7d43f71a6..54190064f 100644
--- a/web/js/components/layer/settings/imagery-search.js
+++ b/web/js/components/layer/settings/imagery-search.js
@@ -119,10 +119,19 @@ export default function ImagerySearch({ layer }) {
}, [page]);
const renderDates = () => {
+ const buttonStyle = {
+ width: '100%',
+ background: 'none',
+ color: 'white',
+ border: 'none',
+ textAlign: 'left',
+ };
const granuleDates = [...olderGranuleDates, ...newerGranuleDates].sort((a, b) => Date.parse(b) - Date.parse(a));
const renderedDates = [...new Set(granuleDates.map((date) => date.toLocaleDateString('en-US', dateOptions)))].map((date, i) => (
- <li className="lazyload-list-item" key={date} onClick={() => handleSelection(date)}>
- {date}
+ <li className="lazyload-list-item" key={date}>
+ <button type="button" style={buttonStyle} onClick={() => handleSelection(date)}>
+ {date}
+ </button>
</li>
));
return renderedDates;
diff --git a/web/js/components/layer/settings/layer-settings.js b/web/js/components/layer/settings/layer-settings.js
index 7997da04e..d8062e4c4 100644
--- a/web/js/components/layer/settings/layer-settings.js
+++ b/web/js/components/layer/settings/layer-settings.js
@@ -10,7 +10,6 @@ import Opacity from './opacity';
import Palette from './palette';
import BandSelection from './band-selection/band-selection-parent-info-menu';
import AssociatedLayers from './associated-layers-toggle';
-import VectorStyle from './vector-style';
import PaletteThreshold from './palette-threshold';
import GranuleLayerDateList from './granule-date-list';
import GranuleCountSlider from './granule-count-slider';
@@ -268,34 +267,6 @@ class LayerSettings extends React.Component {
);
}
- /**
- * Render Opacity, threshold, and custom palette options
- */
- renderVectorStyles() {
- const {
- setStyle,
- clearStyle,
- groupName,
- layer,
- vectorStyles,
- } = this.props;
- let customStyle;
- if (layer.custom && layer.custom[0]) {
- [customStyle] = layer.custom;
- }
- return (
- <VectorStyle
- setStyle={setStyle}
- clearStyle={clearStyle}
- activeVectorStyle={customStyle || layer.id}
- layer={layer}
- index={0}
- groupName={groupName}
- vectorStyles={vectorStyles}
- />
- );
- }
-
/**
* Render Granule count slider and granule date list settings (if granule layer)
*/
diff --git a/web/js/components/layer/settings/palette.js b/web/js/components/layer/settings/palette.js
index eb6e96fe0..d83a5d6c1 100644
--- a/web/js/components/layer/settings/palette.js
+++ b/web/js/components/layer/settings/palette.js
@@ -60,7 +60,7 @@ function PaletteSelect (props) {
onClick={() => onChangePalette(id)}
/>
{isSelected && (
- <span class="dot" />
+ <span className="dot" />
)}
<label htmlFor={`wv-palette-radio-${id}-${index}`}>
<span
@@ -103,10 +103,10 @@ function PaletteSelect (props) {
onClick={() => onChangePalette(id)}
/>
{isSelected && (
- <span class="dot" />
+ <span className="dot" />
)}
<label htmlFor={`wv-palette-radio-${id}-${index}`}>
- <img src={dataURL} />
+ <img alt="Color Palette" src={dataURL} />
<span className="wv-palette-label">{legend.name || 'Default'}</span>
</label>
</div>
diff --git a/web/js/components/layer/settings/vector-style.js b/web/js/components/layer/settings/vector-style.js
deleted file mode 100644
index 008e32f10..000000000
--- a/web/js/components/layer/settings/vector-style.js
+++ /dev/null
@@ -1,187 +0,0 @@
-import React from 'react';
-import PropTypes from 'prop-types';
-import Scrollbar from '../../util/scrollbar';
-import { isConditional } from '../../../modules/vector-styles/util';
-
-class VectorStyleSelect extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- activeVectorStyle: props.activeVectorStyle,
- };
- }
-
- /**
- * Pass vector style to model after selection
- * @param {String} id | custom VectorStyle Id
- */
- onChangeVectorStyle(vectorStyleId) {
- const {
- layer, clearStyle, setStyle, groupName,
- } = this.props;
- setTimeout(() => {
- if (vectorStyleId === layer.id) {
- clearStyle(layer, vectorStyleId, groupName);
- } else {
- setStyle(layer, vectorStyleId, groupName);
- }
- }, 0);
- this.setState({ activeVectorStyle: vectorStyleId });
- }
-
- /**
- * Apply logic to render correct vectorStyle selection
- * @param {String} id | Legend Id
- */
- customLegend(styleLayerObject) {
- const { activeVectorStyle } = this.state;
- const description = styleLayerObject['source-description'] || styleLayerObject.id;
- const isConditionalStyling = styleLayerObject.paint ? isConditional(styleLayerObject.paint['line-color'] || styleLayerObject.paint['circle-color'] || styleLayerObject.paint['fill-color']) : false;
-
- return isConditionalStyling ? this.renderLegendMultiItem(
- styleLayerObject,
- styleLayerObject.id,
- description,
- )
- : this.renderSelectorItemSingle(
- styleLayerObject,
- styleLayerObject.id,
- description,
- activeVectorStyle === styleLayerObject.id,
- );
- }
-
- /**
- * Render classification legend when there are conditionals in the vectorstyles
- * @param {Object} vectorStyle | VectorStyle object
- * @param {String} id | colormap Id
- * @param {String} description | Colormap name
- */
- // eslint-disable-next-line class-methods-use-this
- renderLegendMultiItem(vectorStyle, vectorStyleId, description) {
- const caseDefaultClassName = 'wv-palette-selector-row ';
- const array = Array.from(vectorStyle.paint['line-color'] || vectorStyle.paint['circle-color'] || vectorStyle.paint['fill-color']);
- array.shift();
- const organizedArray = [];
- let temp = [];
- const chunk = 2;
- // https://stackoverflow.com/a/8495740/4589331
- for (let i = 0, j = array.length; i < j; i += chunk) {
- temp = array.slice(i, i + chunk);
- if (temp.length === 2) {
- const obj = {};
- if (temp[0].length === 3
- && typeof temp[0][2] === 'string'
- && typeof temp[1] === 'string'
- ) {
- [[,, obj.label], obj.color] = temp;
- organizedArray.push(obj);
- } else {
- console.warn('Irregular conditional');
- }
- } else if (temp.length === 1 && typeof temp[0] === 'string') {
- organizedArray.push({ label: 'Default', color: temp[0] });
- } else {
- console.warn('Irregular conditional');
- }
- }
- return organizedArray.map((obj, i) => (
- /* eslint react/no-array-index-key: 1 */
- <div key={vectorStyleId + i} className={caseDefaultClassName}>
- <label>
- <span
- className="wv-palettes-class"
- style={{ backgroundColor: obj.color }}
- >
- &nbsp;
- </span>
- <span className="wv-palette-label">{obj.label}</span>
- </label>
- </div>
- ));
- }
-
- /**
- * Render classification customs when there is only one
- * Color in colormap
- * @param {Object} vectorStyle | VectorStyle object
- * @param {String} id | colormap Id
- * @param {String} description | Colormap name
- * @param {Boolean} isSelected | is this colormap active
- */
- renderSelectorItemSingle(vectorStyle, vectorStyleId, description, isSelected) {
- const color = vectorStyle.paint
- ? vectorStyle.paint['line-color'] || vectorStyle.paint['circle-color'] || vectorStyle.paint['fill-color']
- : 'rgb(255, 255, 255)';
- const caseDefaultClassName = 'wv-palette-selector-row wv-checkbox wv-checkbox-round gray ';
- const checkedClassName = isSelected ? 'checked' : '';
- return (
- <div key={vectorStyleId} className={caseDefaultClassName + checkedClassName}>
- <input
- id={`wv-palette-radio-${vectorStyleId}`}
- type="radio"
- name="wv-palette-radio"
- onClick={() => this.onChangeVectorStyle(vectorStyleId)}
- />
- {isSelected && (
- <span class="dot" />
- )}
- <label htmlFor={`wv-palette-radio-${vectorStyleId}`}>
- <span
- className="wv-palettes-class"
- style={{ backgroundColor: color }}
- >
- &nbsp;
- </span>
- <span className="wv-palette-label">{description}</span>
- </label>
- </div>
- );
- }
-
- render() {
- const { index, vectorStyles, layer } = this.props;
- const vectorStyleId = layer.vectorStyle.id;
- const vectorStyle = vectorStyles[vectorStyleId];
- const vectorStyleLayers = vectorStyle.layers;
-
- const uniqueStyleLayers = vectorStyleLayers.filter((a) => {
- if (!this[a.id]) {
- this[a.id] = true;
- return true;
- }
- return false;
- }, Object.create(null));
- return (
- <div
- className="wv-palette-selector settings-component noselect"
- id={`wv-palette-selector${index}`}
- >
- <h2 className="wv-header">Vector Styles</h2>
- <Scrollbar style={{ maxHeight: '200px' }}>
- {
- // eslint-disable-next-line array-callback-return
- uniqueStyleLayers.map((styleLayerObject) => {
- if (styleLayerObject && styleLayerObject) {
- const item = this.customLegend(styleLayerObject);
- return item;
- }
- })
- }
- </Scrollbar>
- </div>
- );
- }
-}
-
-VectorStyleSelect.propTypes = {
- activeVectorStyle: PropTypes.string,
- clearStyle: PropTypes.func,
- groupName: PropTypes.string,
- index: PropTypes.number,
- layer: PropTypes.object,
- setStyle: PropTypes.func,
- vectorStyles: PropTypes.object,
-};
-
-export default VectorStyleSelect;
diff --git a/web/js/components/location-search/location-marker.js b/web/js/components/location-search/location-marker.js
index 1bedc5942..6d809b6a0 100644
--- a/web/js/components/location-search/location-marker.js
+++ b/web/js/components/location-search/location-marker.js
@@ -33,6 +33,12 @@ export default function LocationMarker ({
const coordinates = [latitude, longitude];
const title = getDialogTitle(reverseGeocodeResults);
const [showDialog, setShowDialog] = useState(dialogVisible);
+ const buttonStyle = {
+ background: 'none',
+ color: 'white',
+ border: 'none',
+ textAlign: 'left',
+ };
return (
<div className="location-dialog-pin-wrapper ">
@@ -46,13 +52,20 @@ export default function LocationMarker ({
tooltipId={tooltipId}
/>
)}
- <img
- id="marker-pin"
- src="images/map-pin.png"
- height="32"
- width="20"
+ <button
+ type="button"
+ style={buttonStyle}
+ aria-label="Show coordinates dialog"
onClick={() => setShowDialog(true)}
- />
+ >
+ <img
+ alt="Map marker"
+ id="marker-pin"
+ src="images/map-pin.png"
+ height="32"
+ width="20"
+ />
+ </button>
</div>
);
}
diff --git a/web/js/components/map/rotation.js b/web/js/components/map/rotation.js
index 351f232c8..55690a5a6 100644
--- a/web/js/components/map/rotation.js
+++ b/web/js/components/map/rotation.js
@@ -63,6 +63,7 @@ function Rotation() {
onMouseDown={() => { rotateOnClick(10); }}
onMouseUp={clearIntervalRotation}
onMouseOut={clearIntervalRotation}
+ onBlur={clearIntervalRotation}
onMouseMove={(e) => { e.stopPropagation(); }}
>
<HoverTooltip
@@ -80,6 +81,7 @@ function Rotation() {
onMouseDown={resetRotation}
onMouseUp={clearIntervalRotation}
onMouseOut={clearIntervalRotation}
+ onBlur={clearIntervalRotation}
onMouseMove={(e) => { e.stopPropagation(); }}
>
<HoverTooltip
@@ -97,6 +99,7 @@ function Rotation() {
onMouseDown={() => { rotateOnClick(-10); }}
onMouseUp={clearIntervalRotation}
onMouseOut={clearIntervalRotation}
+ onBlur={clearIntervalRotation}
onMouseMove={(e) => { e.stopPropagation(); }}
>
<HoverTooltip
diff --git a/web/js/components/sidebar/collapsed-button.js b/web/js/components/sidebar/collapsed-button.js
index e4d82e5e2..466327db9 100644
--- a/web/js/components/sidebar/collapsed-button.js
+++ b/web/js/components/sidebar/collapsed-button.js
@@ -18,7 +18,8 @@ class CollapsedButton extends PureComponent {
<div
className={classes}
>
- <a
+ <button
+ type="button"
id={buttonId}
aria-label={labelText}
onClick={onclick}
@@ -40,7 +41,7 @@ class CollapsedButton extends PureComponent {
</span>
)}
{!isMobile && <FontAwesomeIcon className="expand-icon" icon="caret-down" />}
- </a>
+ </button>
</div>
);
}
diff --git a/web/js/components/sidebar/event.js b/web/js/components/sidebar/event.js
index c8ff47969..70a15613b 100644
--- a/web/js/components/sidebar/event.js
+++ b/web/js/components/sidebar/event.js
@@ -106,6 +106,11 @@ function Event (props) {
* Return date list for selected event
*/
function renderDateLists() {
+ const buttonStyle = {
+ background: 'none',
+ border: 'none',
+ color: 'blue',
+ };
if (event.geometry.length > 1) {
return (
<ul
@@ -126,7 +131,9 @@ function Event (props) {
</span>
)
: (
- <a
+ <button
+ type="button"
+ style={buttonStyle}
className="'date item-selected"
onClick={(e) => {
e.stopPropagation();
@@ -134,7 +141,7 @@ function Event (props) {
}}
>
{formatDisplayDate(date)}
- </a>
+ </button>
)}
{magnitudeOutput(geometry)}
</li>
@@ -178,37 +185,49 @@ function Event (props) {
});
}
}
+ const buttonStyle = {
+ width: '100%',
+ background: 'none',
+ color: 'white',
+ border: 'none',
+ textAlign: 'left',
+ };
return (
<li
id={`sidebar-event-${util.encodeId(event.id)}`}
ref={(node) => { elRef.current = node; }}
className={itemClass}
- onClick={(e) => {
- e.stopPropagation();
- onEventSelect();
- }}
- onMouseEnter={(e) => {
- onEventHighlight(true);
- }}
- onMouseLeave={(e) => {
- onEventHighlight(false);
- }}
>
- <EventIcon id={`${event.id}-list`} category={event.categories[0].title} />
- <h4
- className="title"
+ <button
+ type="button"
+ style={buttonStyle}
+ onClick={(e) => {
+ e.stopPropagation();
+ onEventSelect();
+ }}
+ onMouseEnter={(e) => {
+ onEventHighlight(true);
+ }}
+ onMouseLeave={(e) => {
+ onEventHighlight(false);
+ }}
>
- {event.title}
- {' '}
- <br />
- {' '}
- {!isSelected && (
- <MonospaceDate date={dateString} />
- )}
- </h4>
- {isSelected && (<p className="subtitle">{renderReferenceList()}</p>)}
- {renderDateLists()}
+ <EventIcon id={`${event.id}-list`} category={event.categories[0].title} />
+ <h4
+ className="title"
+ >
+ {event.title}
+ {' '}
+ <br />
+ {' '}
+ {!isSelected && (
+ <MonospaceDate date={dateString} />
+ )}
+ </h4>
+ {isSelected && (<p className="subtitle">{renderReferenceList()}</p>)}
+ {renderDateLists()}
+ </button>
</li>
);
}
diff --git a/web/js/components/smart-handoffs/smart-handoff-modal.js b/web/js/components/smart-handoffs/smart-handoff-modal.js
index a21a9c75c..ef0e4ee10 100644
--- a/web/js/components/smart-handoffs/smart-handoff-modal.js
+++ b/web/js/components/smart-handoffs/smart-handoff-modal.js
@@ -45,10 +45,10 @@ function SmartHandoffModal({
<div>
<div className="smart-handoff-heading">
- <a href="https://search.earthdata.nasa.gov" target="_blank" rel="noopener noreferrer">
- <img src="images/nasa-logo.png" style={{ maxHeight: '38px' }} />
+ <a href="https://search.earthdata.nasa.gov" target="_blank" rel="noopener noreferrer" aria-label="Earthdata Search">
+ <img alt="NASA logo" src="images/nasa-logo.png" style={{ maxHeight: '38px' }} />
<span className="smart-handoff-pipe" />
- <img src="images/earthdata-search.png" />
+ <img alt="Earthdata Search" src="images/earthdata-search.png" />
</a>
</div>
@@ -69,7 +69,7 @@ function SmartHandoffModal({
viewport region in @NAME@ will be used to derive data granules within Earthdata Search.
</p>
- <img className="earth-data-gif" src="images/earth-data-search-preview.gif" />
+ <img alt="Earthdata Search preview" className="earth-data-gif" src="images/earth-data-search-preview.gif" />
<p className="earth-data-caption">
Granules that are available to download will be listed in the white pull out menu. Each granule listed can be
downloaded individually or the entire set contained within the bounding box can be downloaded as a zip file.
diff --git a/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js b/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
index 4514992d5..d01699705 100644
--- a/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
+++ b/web/js/components/timeline/custom-interval-selector/custom-interval-selector.js
@@ -60,7 +60,6 @@ function CustomIntervalSelector(props) {
<div
onKeyDown={handleKeyPress}
className={`custom-interval-widget ${hasSubdailyLayers ? 'subdaily' : ''}`}
- tabIndex={0}
ref={(widget) => { customIntervalWidget = widget; }}
>
<h3 className="custom-interval-widget-header">Custom Interval Selector</h3>
diff --git a/web/js/components/timeline/timeline-axis/timeline-axis.js b/web/js/components/timeline/timeline-axis/timeline-axis.js
index 18728d473..ab3a870d5 100644
--- a/web/js/components/timeline/timeline-axis/timeline-axis.js
+++ b/web/js/components/timeline/timeline-axis/timeline-axis.js
@@ -1513,7 +1513,9 @@ class TimelineAxis extends Component {
onMouseUp={this.setLineTime}
onWheel={this.handleWheelType}
onMouseOver={this.showHoverOn}
+ onFocus={this.showHoverOn}
onMouseLeave={showHoverOff}
+ onBlur={showHoverOff}
onTouchStart={this.handleMouseDown}
onTouchEnd={this.setLineTimeTouch}
>
diff --git a/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js b/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
index 3d990941a..a68870dcc 100644
--- a/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
+++ b/web/js/components/timeline/timeline-controls/axis-timescale-change-tooltip.js
@@ -52,7 +52,7 @@ class AxisTimeScaleChangeTooltip extends PureComponent {
style={{ display: toolTipHovered ? 'block' : 'none' }}
>
<div id="timeline-zoom" className="timeline-zoom">
- <label
+ <p
style={{
textDecoration: 'underline',
paddingBottom: '4px',
@@ -60,7 +60,7 @@ class AxisTimeScaleChangeTooltip extends PureComponent {
}}
>
TIMESCALE
- </label>
+ </p>
<span
id="zoom-years"
className="zoom-btn zoom-years"
diff --git a/web/js/components/timeline/timeline-coverage/info-modal.js b/web/js/components/timeline/timeline-coverage/info-modal.js
index 3ca2349aa..cb6891dad 100644
--- a/web/js/components/timeline/timeline-coverage/info-modal.js
+++ b/web/js/components/timeline/timeline-coverage/info-modal.js
@@ -13,14 +13,14 @@ function LayerCoverageInfoModal() {
</header>
<div className="layer-coverage-info-item-container">
<section className="layer-coverage-info-item-left">
- <img src="images/lc-axis.png" />
+ <img alt="Timeline layer coverage axis" src="images/lc-axis.png" />
</section>
<section className="layer-coverage-info-item-right">
<div>
<p>
Including layers that are hidden may affect the display of the timeline’s solid blue overlapping coverage line as it will take into account the dates of those layers, too.
</p>
- <img src="images/lc-toggle.png" />
+ <img alt="Include Hidden Layers toggle" src="images/lc-toggle.png" />
</div>
<div>
<p>
diff --git a/web/js/components/timeline/timeline-coverage/timeline-coverage.js b/web/js/components/timeline/timeline-coverage/timeline-coverage.js
index be3450029..f6450fff3 100644
--- a/web/js/components/timeline/timeline-coverage/timeline-coverage.js
+++ b/web/js/components/timeline/timeline-coverage/timeline-coverage.js
@@ -309,9 +309,15 @@ class TimelineLayerCoveragePanel extends Component {
const { onInfoClick } = this.props;
const layerInfoBtnId = 'layer-coverage-info-button';
const layerInfoBtnTitle = 'Timeline Layer Coverage Information';
+ const buttonStyle = {
+ border: 'none',
+ background: 'none',
+ };
return (
- <a
+ <button
+ type="button"
+ style={buttonStyle}
id={layerInfoBtnId}
aria-label={layerInfoBtnTitle}
className={layerInfoBtnId}
@@ -319,7 +325,7 @@ class TimelineLayerCoveragePanel extends Component {
onClick={() => onInfoClick()}
>
<FontAwesomeIcon icon="question-circle" className="layer-coverage-info-button-icon" />
- </a>
+ </button>
);
};
diff --git a/web/js/components/tooltip/tooltip.js b/web/js/components/tooltip/tooltip.js
deleted file mode 100644
index 4457e0ff6..000000000
--- a/web/js/components/tooltip/tooltip.js
+++ /dev/null
@@ -1,68 +0,0 @@
-
-import React from 'react';
-import PropTypes from 'prop-types';
-
-class Tooltip extends React.Component {
- constructor(props) {
- super(props);
- this.state = {
- hovered: false,
- };
- }
-
- mouseOver() {
- this.setState({
- hovered: true,
- });
- }
-
- mouseOut() {
- this.setState({
- hovered: false,
- });
- }
-
- onClick(str) {
- const { onClick } = this.props;
- onClick(str);
- }
-
- render() {
- const { text, dataArray } = this.props;
- const { hovered } = this.state;
- return (
- <div
- onMouseEnter={this.mouseOver.bind(this)}
- onMouseLeave={this.mouseOut.bind(this)}
- className="wv-tooltip-case"
- >
- <span>{text}</span>
- <div
- className="wv-tooltip"
- style={hovered ? { visibility: 'visible' } : {}}
- >
- <ul>
- {dataArray.map((dataEl, i) => (
- <li
- /* eslint react/no-array-index-key: 1 */
- key={`tooltip-${dataEl}-${i}`}
- id={dataEl}
- onClick={this.onClick.bind(this, dataEl)}
- >
- {dataEl}
- </li>
- ))}
- </ul>
- </div>
- </div>
- );
- }
-}
-
-Tooltip.propTypes = {
- dataArray: PropTypes.array.isRequired,
- text: PropTypes.string.isRequired,
- onClick: PropTypes.func,
-};
-
-export default Tooltip;
diff --git a/web/js/components/tour/content-intro.js b/web/js/components/tour/content-intro.js
index 6bf1536e3..2d5293e99 100644
--- a/web/js/components/tour/content-intro.js
+++ b/web/js/components/tour/content-intro.js
@@ -13,10 +13,17 @@ function TourIntro(props) {
<a href="https://earthdata.nasa.gov/" target="_blank" rel="noreferrer">NASA Earthdata</a>
), the satellite imagery we provide and events occurring around the world.
{' '}
- <a href="#" title="Start using @NAME@" onClick={props.toggleModalStart} className="start-link">
+ <button
+ type="button"
+ style={{ border: 'none', background: 'none', padding: '0' }}
+ href="#"
+ title="Start using @NAME@"
+ onClick={props.toggleModalStart}
+ className="start-link"
+ >
Start using @NAME@
<ArrowLineRightCircleFill class="intro-arrow" size="16px" />
- </a>
+ </button>
</p>
</div>
);
diff --git a/web/js/components/tour/tour-box.js b/web/js/components/tour/tour-box.js
index c5ff9b865..d639bf5a1 100644
--- a/web/js/components/tour/tour-box.js
+++ b/web/js/components/tour/tour-box.js
@@ -17,6 +17,8 @@ class TourBox extends React.Component {
if (backgroundImage) {
this.setState({
styles: {
+ border: 'none',
+ padding: '0',
backgroundImage: `url(config/metadata/stories/${storyId}/${backgroundImage})`,
},
});
@@ -29,6 +31,8 @@ class TourBox extends React.Component {
if (backgroundImageHover) {
this.setState({
styles: {
+ border: 'none',
+ padding: '0',
backgroundImage: `url(config/metadata/stories/${storyId}/${backgroundImageHover})`,
},
});
@@ -41,6 +45,8 @@ class TourBox extends React.Component {
if (backgroundImage) {
this.setState({
styles: {
+ border: 'none',
+ padding: '0',
backgroundImage: `url(config/metadata/stories/${storyId}/${backgroundImage})`,
},
});
@@ -58,11 +64,13 @@ class TourBox extends React.Component {
floatBox = ' tour-box-float';
}
return (
- <a
- href="#"
+ <button
+ type="button"
style={styles}
onMouseOver={(e) => this.onMouseOver(e)}
+ onFocus={this.onMouseOver}
onMouseOut={(e) => this.onMouseOut(e)}
+ onBlur={this.onMouseOut}
className={className + floatBox}
onClick={(e) => selectTour(e, story, index, storyId)}
>
@@ -76,7 +84,7 @@ class TourBox extends React.Component {
<p>{description}</p>
</div>
</div>
- </a>
+ </button>
);
}
}
diff --git a/web/js/components/tour/widget-steps.js b/web/js/components/tour/widget-steps.js
index 0dd736177..d96878236 100644
--- a/web/js/components/tour/widget-steps.js
+++ b/web/js/components/tour/widget-steps.js
@@ -30,15 +30,23 @@ function Steps(props) {
};
}, []);
+ const buttonStyle = {
+ border: 'none',
+ background: 'none',
+ padding: '0',
+ };
+
return (
<div className="step-container">
- <a
+ <button
+ type="button"
+ style={buttonStyle}
className={isKioskModeActive ? 'd-none' : 'step-previous'}
aria-label="Previous"
onClick={decreaseStep}
>
<FontAwesomeIcon icon="arrow-circle-left" />
- </a>
+ </button>
<div className="step-counter">
<p>
Step
@@ -48,7 +56,9 @@ function Steps(props) {
<span className="step-total">{totalSteps}</span>
</p>
</div>
- <a
+ <button
+ type="button"
+ style={buttonStyle}
className={isKioskModeActive ? 'd-none' : 'step-next'}
aria-label="Next"
onClick={incrementStep}
@@ -56,7 +66,7 @@ function Steps(props) {
{currentStep === totalSteps
? <FontAwesomeIcon icon="check-circle" />
: <FontAwesomeIcon icon="arrow-circle-right" />}
- </a>
+ </button>
</div>
);
}
diff --git a/web/js/components/util/image-crop.js b/web/js/components/util/image-crop.js
index 9e26d02ac..9d1514753 100644
--- a/web/js/components/util/image-crop.js
+++ b/web/js/components/util/image-crop.js
@@ -114,7 +114,7 @@ function Crop(props) {
onComplete={onFinishDrag}
onChange={onDrag}
>
- <img src={TRANSPARENT_GIF} style={{ width: maxWidth, height: maxHeight }} />
+ <img alt="" src={TRANSPARENT_GIF} style={{ width: maxWidth, height: maxHeight }} />
</ReactCrop>
</>,
document.getElementById('wv-content'),
diff --git a/web/js/components/util/switch.js b/web/js/components/util/switch.js
index 316d3968e..d639c3cd5 100644
--- a/web/js/components/util/switch.js
+++ b/web/js/components/util/switch.js
@@ -1,3 +1,6 @@
+/* eslint-disable jsx-a11y/no-noninteractive-tabindex */
+/* eslint-disable jsx-a11y/label-has-associated-control */
+/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import { Tooltip } from 'reactstrap';
diff --git a/web/js/containers/share.js b/web/js/containers/share.js
index 8f88a57f7..f88d1036f 100644
--- a/web/js/containers/share.js
+++ b/web/js/containers/share.js
@@ -293,7 +293,14 @@ class ShareLinkContainer extends Component {
<p>
Please
{' '}
- <a onClick={this.openFeedback} id="feedback-url">contact us</a>
+ <button
+ type="button"
+ style={{ border: 'none', background: 'none', padding: '0' }}
+ onClick={this.openFeedback}
+ id="feedback-url"
+ >
+ contact us
+ </button>
{' '}
to enable Worldview embedding on your website.
</p>
diff --git a/web/js/containers/sidebar/layer-row.js b/web/js/containers/sidebar/layer-row.js
index 8852189ea..a1e4ba9c3 100644
--- a/web/js/containers/sidebar/layer-row.js
+++ b/web/js/containers/sidebar/layer-row.js
@@ -352,7 +352,8 @@ function LayerRow (props) {
<>
{showDropdownBtn || isMobile ? renderDropdownMenu() : null}
{!isChartingActive && (
- <a
+ <button
+ type="button"
id={removeLayerBtnId}
aria-label={removeLayerBtnTitle}
className={isMobile ? 'hidden wv-layers-options' : 'button wv-layers-close'}
@@ -362,9 +363,10 @@ function LayerRow (props) {
{removeLayerBtnTitle}
</UncontrolledTooltip>
<FontAwesomeIcon icon="times" fixedWidth />
- </a>
+ </button>
)}
- <a
+ <button
+ type="button"
id={layerOptionsBtnId}
aria-label={layerOptionsBtnTitle}
className={isMobile ? 'hidden wv-layers-options' : 'button wv-layers-options'}
@@ -375,8 +377,9 @@ function LayerRow (props) {
{layerOptionsBtnTitle}
</UncontrolledTooltip>
<FontAwesomeIcon icon="sliders-h" className="wv-layers-options-icon" />
- </a>
- <a
+ </button>
+ <button
+ type="button"
id={layerInfoBtnId}
aria-label={layerInfoBtnTitle}
className={isMobile ? 'hidden wv-layers-info' : 'button wv-layers-info'}
@@ -387,7 +390,7 @@ function LayerRow (props) {
{layerInfoBtnTitle}
</UncontrolledTooltip>
<FontAwesomeIcon icon="fa-solid fa-info" className="wv-layers-info-icon" />
- </a>
+ </button>
</>
);
@@ -477,7 +480,8 @@ function LayerRow (props) {
const renderLayerRow = () => (
<>
{(!isEmbedModeActive && !isChartingActive) && (
- <a
+ <button
+ type="button"
id={`hide${encodedLayerId}`}
className={getVisibilityToggleClass()}
aria-label={visibilityTitle}
@@ -493,12 +497,13 @@ function LayerRow (props) {
</UncontrolledTooltip>
)}
<FontAwesomeIcon icon={visibilityIconClass} className="layer-eye-icon" />
- </a>
+ </button>
)}
{isChartingActive && (
<>
<div />
- <a
+ <button
+ type="button"
id={`activate-${encodedLayerId}`}
className={layer.id === activeChartingLayer ? 'layer-visible visibility active-chart' : 'layer-visible visibility'}
onClick={() => makeActiveForCharting(layer.id)}
@@ -521,7 +526,7 @@ function LayerRow (props) {
className="charting-indicator"
/>
)}
- </a>
+ </button>
</>
)}
<Zot zot={activeZot || zot} layer={layer.id} isMobile={isMobile} />
@@ -602,7 +607,9 @@ function LayerRow (props) {
style={getItemStyle(snapshot.isDragging, provided.draggableProps.style)}
ref={provided.innerRef}
onMouseOver={mouseOver}
+ onFocus={mouseOver}
onMouseLeave={mouseLeave}
+ onBlur={mouseLeave}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
diff --git a/web/js/containers/sidebar/layers-container.js b/web/js/containers/sidebar/layers-container.js
index de27bc1e1..842218a37 100644
--- a/web/js/containers/sidebar/layers-container.js
+++ b/web/js/containers/sidebar/layers-container.js
@@ -128,23 +128,22 @@ function LayersContainer (props) {
const shouldHideForEmbedNoOverlays = isEmbedModeActive && overlays.length === 0;
const shouldHideForEmbedNoBaseLayers = isEmbedModeActive && baselayers.length === 0;
return isActive && (
- <>
- <div id="layers-scroll-container" style={scrollContainerStyles}>
- <div className="layer-container sidebar-panel">
+ <div id="layers-scroll-container" style={scrollContainerStyles}>
+ <div className="layer-container sidebar-panel">
- {groupOverlays ? renderOverlayGroups() : !shouldHideForEmbedNoOverlays && (
- <LayerList
- title="Overlays"
- groupId="overlays"
- compareState={compareState}
- collapsed={overlaysCollapsed}
- toggleCollapse={() => toggleOverlaysCollapsed(!overlaysCollapsed)}
- layers={overlays}
- layerSplit={overlays.length}
- />
- )}
+ {groupOverlays ? renderOverlayGroups() : !shouldHideForEmbedNoOverlays && (
+ <LayerList
+ title="Overlays"
+ groupId="overlays"
+ compareState={compareState}
+ collapsed={overlaysCollapsed}
+ toggleCollapse={() => toggleOverlaysCollapsed(!overlaysCollapsed)}
+ layers={overlays}
+ layerSplit={overlays.length}
+ />
+ )}
- {!shouldHideForEmbedNoBaseLayers && (
+ {!shouldHideForEmbedNoBaseLayers && (
<div className="layer-group-baselayers">
<LayerList
title="Base Layers"
@@ -156,10 +155,9 @@ function LayersContainer (props) {
layerSplit={overlays.length}
/>
</div>
- )}
- </div>
+ )}
</div>
- </>
+ </div>
);
}
diff --git a/web/js/containers/sidebar/smart-handoff.js b/web/js/containers/sidebar/smart-handoff.js
index 8c364ead0..d449a1539 100644
--- a/web/js/containers/sidebar/smart-handoff.js
+++ b/web/js/containers/sidebar/smart-handoff.js
@@ -513,9 +513,14 @@ class SmartHandoff extends Component {
</h1>
<hr />
<h2>
- <a className="help-link" onClick={showNotAvailableModal}>
+ <button
+ type="button"
+ style={{ border: 'none', background: 'none', padding: '0' }}
+ className="help-link"
+ onClick={showNotAvailableModal}
+ >
Why are my layers not available?
- </a>
+ </button>
</h2>
</>
)}
@@ -585,9 +590,14 @@ class SmartHandoff extends Component {
application.
</div>
<h2>
- <a className="help-link" onClick={showNotAvailableModal}>
+ <button
+ type="button"
+ style={{ border: 'none', background: 'none', padding: '0' }}
+ className="help-link"
+ onClick={showNotAvailableModal}
+ >
Why are some layers not available?
- </a>
+ </button>
</h2>
<hr />
{this.renderLayerChoices()}
diff --git a/web/scss/features/anim-widget.scss b/web/scss/features/anim-widget.scss
index 8b4c3075a..8020280d9 100644
--- a/web/scss/features/anim-widget.scss
+++ b/web/scss/features/anim-widget.scss
@@ -162,6 +162,7 @@
}
& > a,
+ & > button,
& > div {
display: inline-block;
margin: 7px 0 0 10px;
@@ -179,6 +180,8 @@
background: variables.$wv-dark-blue;
position: relative;
border-radius: 5px;
+ padding: 0;
+ border: none;
&.disabled {
cursor: not-allowed;
@@ -260,7 +263,7 @@
}
}
-a .wv-animation-widget-icon {
+button .wv-animation-widget-icon {
font-size: 23px;
color: #fff;
position: absolute;
diff --git a/web/scss/features/layer-categories.scss b/web/scss/features/layer-categories.scss
index d306d8ac1..9c5b2d4cc 100644
--- a/web/scss/features/layer-categories.scss
+++ b/web/scss/features/layer-categories.scss
@@ -170,6 +170,9 @@
overflow: hidden;
box-sizing: border-box;
text-decoration: none;
+ background: none;
+ text-align: left;
+ border: none;
}
& .layer-category-name:hover {
diff --git a/web/scss/features/sidebar-panel.scss b/web/scss/features/sidebar-panel.scss
index fca20a369..300ab1f11 100644
--- a/web/scss/features/sidebar-panel.scss
+++ b/web/scss/features/sidebar-panel.scss
@@ -3,7 +3,7 @@
.sidebar-expand {
position: relative;
- > a {
+ > button {
float: left;
left: 10px;
position: absolute;
@@ -257,7 +257,7 @@ li.item.productsitem.inmotion,
border-color: #fff;
}
-.productsitem a.visibility {
+.productsitem button.visibility {
width: 30px;
background-color: #ccc;
position: absolute;
@@ -265,6 +265,11 @@ li.item.productsitem.inmotion,
bottom: 0;
cursor: pointer;
border-right: 1px solid #333;
+ border-top: none;
+ border-bottom: none;
+ border-left: none;
+ text-align: left;
+ padding: 0;
&.layer-enabled:hover {
background: #fff;
@@ -387,12 +392,15 @@ li.item.productsitem.inmotion,
* End -- Granule active footprint toggle *
************************************/
-.productsitem a.wv-layers-info,
-.productsitem a.wv-layers-options {
+.productsitem button.wv-layers-info,
+.productsitem button.wv-layers-options {
position: relative;
width: 20px;
height: 20px;
float: right;
+ border: none;
+ background:none;
+ padding: 0;
}
.productsitem.inmotion {
@@ -400,9 +408,9 @@ li.item.productsitem.inmotion,
list-style: none;
}
-.productsitem a.wv-layers-close:hover,
-.productsitem a.wv-layers-info:hover,
-.productsitem a.wv-layers-options:hover {
+.productsitem button.wv-layers-close:hover,
+.productsitem button.wv-layers-info:hover,
+.productsitem button.wv-layers-options:hover {
background: #fff;
}
@@ -413,7 +421,6 @@ li.item.productsitem.inmotion,
text-align: center;
border-radius: 50%;
padding: 1px;
- margin-top: 3px;
}
.layer-info svg.svg-inline--fa.wv-layers-options-icon {
@@ -426,11 +433,11 @@ li.item.productsitem.inmotion,
margin-left: -6px;
}
-.productsitem.layer-hidden a.wv-layers-options svg.svg-inline--fa.wv-layers-options-icon {
+.productsitem.layer-hidden button.wv-layers-options svg.svg-inline--fa.wv-layers-options-icon {
background-position: -21px -69px;
}
-.productsitem.layer-hidden a.wv-layers-options:hover svg.svg-inline--fa.wv-layers-options-icon {
+.productsitem.layer-hidden button.wv-layers-options:hover svg.svg-inline--fa.wv-layers-options-icon {
background-position: 0 -69px;
}
@@ -514,15 +521,17 @@ li.item.productsitem.inmotion,
}
}
-.productsitem a.button.wv-layers-close {
+.productsitem button.wv-layers-close {
display: block;
float: right;
width: 20px;
height: 20px;
position: relative;
+ background: none;
+ border: none;
}
-.productsitem a.button.wv-layers-close svg.svg-inline--fa {
+.productsitem button.wv-layers-close svg.svg-inline--fa {
width: 12px;
pointer-events: none;
position: absolute;
@@ -604,7 +613,7 @@ li.item.productsitem.inmotion,
height: 42px;
}
-.productsitem.layer-hidden a.visibility {
+.productsitem.layer-hidden button.visibility {
background: #666;
}
@@ -613,12 +622,12 @@ li.item.productsitem.inmotion,
cursor: default;
}
-.disabled.layer-hidden a.visibility:hover {
+.disabled.layer-hidden button.visibility:hover {
background: rgb(255 255 255 / 20%);
cursor: default;
}
-.productsitem.disabled.layer-hidden a.visibility:hover svg.svg-inline--fa {
+.productsitem.disabled.layer-hidden button.visibility:hover svg.svg-inline--fa {
color: #c5c5c8;
}
@@ -694,7 +703,7 @@ li.item.productsitem.inmotion,
margin-top: -13px;
}
- a.visibility {
+ button.visibility {
width: 45px;
}
}
diff --git a/web/scss/features/sidebar.scss b/web/scss/features/sidebar.scss
index 0e15394ce..096b05efe 100644
--- a/web/scss/features/sidebar.scss
+++ b/web/scss/features/sidebar.scss
@@ -711,41 +711,41 @@ p.recharts-tooltip-label {
}
/* Layers Info */
-.sidebar-panel li.item a.wv-layers-info {
+.sidebar-panel li.item button.wv-layers-info {
color: #333;
text-align: center;
}
-.sidebar-panel li.item a.wv-layers-info .wv-layers-info-icon {
+.sidebar-panel li.item button.wv-layers-info .wv-layers-info-icon {
border-color: #333;
}
-.sidebar-panel li.item a.wv-layers-info.disabled {
+.sidebar-panel li.item button.wv-layers-info.disabled {
color: #aaa;
}
-.sidebar-panel li.item a.wv-layers-info.disabled .wv-layers-info-icon {
+.sidebar-panel li.item button.wv-layers-info.disabled .wv-layers-info-icon {
border-color: #aaa;
}
-.sidebar-panel li.item a.wv-layers-info.disabled:hover {
+.sidebar-panel li.item button.wv-layers-info.disabled:hover {
cursor: no-drop;
background-color: transparent;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info {
+.sidebar-panel li.layer-hidden button.wv-layers-info {
color: #999;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info .wv-layers-info-icon {
+.sidebar-panel li.layer-hidden button.wv-layers-info .wv-layers-info-icon {
border-color: #999;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info.disabled {
+.sidebar-panel li.layer-hidden button.wv-layers-info.disabled {
color: #666;
}
-.sidebar-panel li.layer-hidden a.wv-layers-info.disabled .wv-layers-info-icon {
+.sidebar-panel li.layer-hidden button.wv-layers-info.disabled .wv-layers-info-icon {
border-color: #666;
}