mirror of
https://github.com/a-nyx/maputnik-with-pmtiles.git
synced 2025-01-16 15:04:19 +01:00
Merge pull request #309 from orangemug/feature/skip-menu
Added skip-menu link for keyboard users
This commit is contained in:
commit
0f103c3c00
3 changed files with 27 additions and 0 deletions
|
@ -135,9 +135,13 @@ export default class Toolbar extends React.Component {
|
|||
/>
|
||||
<div className="maputnik-toolbar__inner">
|
||||
<ToolbarLink
|
||||
tabIndex="2"
|
||||
href={"https://github.com/maputnik/editor"}
|
||||
className="maputnik-toolbar-logo"
|
||||
>
|
||||
<a tabIndex="1" className="maputnik-toolbar-skip" href="#skip-menu">
|
||||
Skip navigation
|
||||
</a>
|
||||
<img src={logoImage} alt="Maputnik" />
|
||||
<h1>Maputnik
|
||||
<span className="maputnik-toolbar-version">v{pkgJson.version}</span>
|
||||
|
|
|
@ -209,6 +209,7 @@ class LayerListContainer extends React.Component {
|
|||
<div className="maputnik-default-property">
|
||||
<div className="maputnik-multibutton">
|
||||
<button
|
||||
id="skip-menu"
|
||||
onClick={this.toggleLayers.bind(this)}
|
||||
className="maputnik-button">
|
||||
{this.state.areAllGroupsExpanded === true ? "Collapse" : "Expand"}
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
background-color: $color-black;
|
||||
padding: $margin-2;
|
||||
height: $toolbar-height;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
h1 {
|
||||
display: inline;
|
||||
|
@ -80,3 +82,23 @@
|
|||
flex: 1;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.maputnik-toolbar-skip {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
width: 0px;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
background-color: $color-black;
|
||||
z-index: 999;
|
||||
line-height: 40px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
&:active,
|
||||
&:focus {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue