Skip to content

Commit

Permalink
Accessible collapse pane buttons (firefox-devtools#4128)
Browse files Browse the repository at this point in the history
  • Loading branch information
Johnny Khalil committed Oct 13, 2017
1 parent 1c4372b commit ba3a559
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
10 changes: 10 additions & 0 deletions src/components/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
box-sizing: border-box;
}

button {
background: transparent;
outline: none;
border: none;
}

button:hover,button:focus {
background-color: var(--theme-toolbar-background-hover);
}

.debugger {
display: flex;
flex: 1;
Expand Down
10 changes: 5 additions & 5 deletions src/components/shared/Button/PaneToggle.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
.toggle-button-start,
.toggle-button-end {
transform: translate(0, 2px);
transform: translate(0, 0px);
transition: transform 0.25s ease-in-out;
padding: 5px 2px;
padding: 5px 5px;
}

.toggle-button-start.vertical,
.toggle-button-end.vertical {
padding: 4px 2px;
padding: 2.5px 2.5px;
}

.toggle-button-start svg,
Expand All @@ -22,12 +22,12 @@
}

.toggle-button-end {
margin-inline-end: 5px;
margin-inline-end: 0px;
margin-inline-start: auto;
}

.toggle-button-start {
margin-inline-start: 5px;
margin-inline-start: 0px;
}

html:not([dir="rtl"]) .toggle-button-end svg,
Expand Down
4 changes: 2 additions & 2 deletions src/components/shared/Button/PaneToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class PaneToggleButton extends Component {
: L10N.getStr("collapsePanes");

return (
<div
<button
className={classnames(`toggle-button-${position}`, {
collapsed,
vertical: horizontal != null ? !horizontal : false
Expand All @@ -38,7 +38,7 @@ class PaneToggleButton extends Component {
title={title}
>
<Svg name="togglePanes" />
</div>
</button>
);
}
}
Expand Down

0 comments on commit ba3a559

Please sign in to comment.