mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2024-12-28 02:55:28 +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() {
|
||||
return <a
|
||||
return <button
|
||||
className='maputnik-toolbar-action'
|
||||
data-wd-key={this.props.wdKey}
|
||||
onClick={this.props.onClick}
|
||||
>
|
||||
{this.props.children}
|
||||
</a>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -208,21 +208,21 @@ class LayerListContainer extends React.Component {
|
|||
<span className="maputnik-space" />
|
||||
<div className="maputnik-default-property">
|
||||
<div className="maputnik-multibutton">
|
||||
<a
|
||||
<button
|
||||
onClick={this.toggleLayers.bind(this)}
|
||||
className="maputnik-button">
|
||||
{this.state.areAllGroupsExpanded === true ? "Collapse" : "Expand"}
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="maputnik-default-property">
|
||||
<div className="maputnik-multibutton">
|
||||
<a
|
||||
<button
|
||||
onClick={this.toggleModal.bind(this, 'add')}
|
||||
data-wd-key="layer-list:add-layer"
|
||||
className="maputnik-button maputnik-button-selected">
|
||||
Add Layer
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
font-size: $font-size-6;
|
||||
padding: $margin-2;
|
||||
user-select: none;
|
||||
border-width: 0;
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
|
|
@ -91,7 +91,6 @@
|
|||
|
||||
.maputnik-button-selected {
|
||||
background-color: lighten($color-midgray, 12);
|
||||
outline: 1px $color-white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,6 +57,8 @@
|
|||
}
|
||||
|
||||
.maputnik-toolbar-action {
|
||||
background: inherit;
|
||||
border-width: 0;
|
||||
@extend .maputnik-toolbar-link;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue