mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-29 09:10:30 +01:00
Merge pull request #298 from orangemug/fix/keyboard-accessible-buttons
Made buttons keyboard accessible
This commit is contained in:
commit
354b2fb3cb
5 changed files with 9 additions and 7 deletions
|
@ -63,13 +63,13 @@ class ToolbarAction extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return <a
|
return <button
|
||||||
className='maputnik-toolbar-action'
|
className='maputnik-toolbar-action'
|
||||||
data-wd-key={this.props.wdKey}
|
data-wd-key={this.props.wdKey}
|
||||||
onClick={this.props.onClick}
|
onClick={this.props.onClick}
|
||||||
>
|
>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</a>
|
</button>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,21 +208,21 @@ class LayerListContainer extends React.Component {
|
||||||
<span className="maputnik-space" />
|
<span className="maputnik-space" />
|
||||||
<div className="maputnik-default-property">
|
<div className="maputnik-default-property">
|
||||||
<div className="maputnik-multibutton">
|
<div className="maputnik-multibutton">
|
||||||
<a
|
<button
|
||||||
onClick={this.toggleLayers.bind(this)}
|
onClick={this.toggleLayers.bind(this)}
|
||||||
className="maputnik-button">
|
className="maputnik-button">
|
||||||
{this.state.areAllGroupsExpanded === true ? "Collapse" : "Expand"}
|
{this.state.areAllGroupsExpanded === true ? "Collapse" : "Expand"}
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="maputnik-default-property">
|
<div className="maputnik-default-property">
|
||||||
<div className="maputnik-multibutton">
|
<div className="maputnik-multibutton">
|
||||||
<a
|
<button
|
||||||
onClick={this.toggleModal.bind(this, 'add')}
|
onClick={this.toggleModal.bind(this, 'add')}
|
||||||
data-wd-key="layer-list:add-layer"
|
data-wd-key="layer-list:add-layer"
|
||||||
className="maputnik-button maputnik-button-selected">
|
className="maputnik-button maputnik-button-selected">
|
||||||
Add Layer
|
Add Layer
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
font-size: $font-size-6;
|
font-size: $font-size-6;
|
||||||
padding: $margin-2;
|
padding: $margin-2;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
border-width: 0;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,6 @@
|
||||||
|
|
||||||
.maputnik-button-selected {
|
.maputnik-button-selected {
|
||||||
background-color: lighten($color-midgray, 12);
|
background-color: lighten($color-midgray, 12);
|
||||||
outline: 1px $color-white;
|
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.maputnik-toolbar-action {
|
.maputnik-toolbar-action {
|
||||||
|
background: inherit;
|
||||||
|
border-width: 0;
|
||||||
@extend .maputnik-toolbar-link;
|
@extend .maputnik-toolbar-link;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue