Skip to content

Commit

Permalink
chore: remove focus-visible polyfill from local dev server (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed Apr 13, 2024
1 parent 028f4dc commit 1cd4b9d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -273,7 +273,7 @@ Here is a full list of options:

### Focus outline

For accessibility reasons, `emoji-picker-element` displays a prominent focus ring. If you want to hide the focus ring for non-keyboard users (e.g. mouse and touch only), then use the [focus-visible](https://github.com/WICG/focus-visible) polyfill, e.g.:
For accessibility reasons, `emoji-picker-element` displays a prominent focus ring for keyboard users. This uses [`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible) under the hood. To properly support [browsers that do not support `:focus-visible`](https://caniuse.com/css-focus-visible), you can use the [focus-visible](https://github.com/WICG/focus-visible) polyfill, e.g.:

```js
import 'focus-visible';
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -95,7 +95,6 @@
"fast-glob": "^3.3.2",
"fetch-mock": "^9.11.0",
"flat-color-icons": "^1.1.0",
"focus-visible": "^5.2.0",
"get-folder-size": "^4.0.0",
"husky": "^9.0.11",
"jsdom": "^24.0.0",
Expand Down
7 changes: 0 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions test/adhoc/index.html
Expand Up @@ -47,7 +47,6 @@
</head>
<body>
<button class="delete">Delete database</button>
<script src="/node_modules/focus-visible/dist/focus-visible.js"></script>
<script type="module">
import { Picker, Database } from '/index.js'
(async () => {
Expand Down Expand Up @@ -89,7 +88,6 @@
}
const picker = new Picker(opts)
picker.addEventListener('emoji-click', e => console.log(e))
applyFocusVisiblePolyfill(picker.shadowRoot)
document.body.appendChild(picker)
})()
</script>
Expand Down

0 comments on commit 1cd4b9d

Please sign in to comment.