Skip to content

Commit

Permalink
Remove tabindex ruleset
Browse files Browse the repository at this point in the history
`tabindex=-1` CSS ruleset has been removed in order to support visual feedback on programmatically focused elements.
  • Loading branch information
Kristofor Salmin committed Oct 4, 2018
1 parent cb4e234 commit bf1d0be
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
### HEAD

* Update normalize.css to `^8.0.0`.
* Remove `tabindex=-1` ruleset.

### 4.0.0 (September 25th, 2017)

Expand Down
10 changes: 0 additions & 10 deletions lib/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,3 @@ ul {
margin: 0;
padding: 0;
}

/**
* Suppress the focus outline on elements that cannot be accessed via keyboard.
* This prevents an unwanted focus outline from appearing around elements that
* might still respond to pointer events.
*/

[tabindex="-1"]:focus {
outline: none !important;
}
12 changes: 0 additions & 12 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
#iframe iframe {
background-clip: content-box;
}

#tabindex a:focus,
#tabindex button:focus {
outline: 5px solid red;
}
</style>

<div class="Test">
Expand Down Expand Up @@ -135,13 +130,6 @@ <h3 class="Test-it">has no border, margin, or padding</h3>
<iframe class="dev-highlight"></iframe>
</div>

<h2 class="Test-describe">[tabindex="-1"]:focus</h2>
<h3 class="Test-it">has no focus outline (try clicking to trigger focus)</h3>
<div class="Test-run" id="tabindex">
<a class="dev-highlight" href="#n" tabindex="-1">example link</a>
<button class="dev-highlight" tabindex="-1">example button</button>
</div>

<h2 class="Test-describe">border-box</h2>
<h3 class="Test-it">padding should not add to the element width (elements should be centred)</h3>
<div class="Test-run" style="width: 80%; margin: 0 auto">
Expand Down

0 comments on commit bf1d0be

Please sign in to comment.