mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 23:50:59 +00:00
Merge branch 'master' of github.com:chrismccord/live_beats
This commit is contained in:
commit
fba89209bd
2 changed files with 7 additions and 13 deletions
|
@ -180,16 +180,10 @@ let liveSocket = new LiveSocket("/live", Socket, {
|
|||
let routeUpdated = () => {
|
||||
let target = document.querySelector("main h1") || document.querySelector("main")
|
||||
if (target) {
|
||||
let origTabIndex = target.getAttribute("tabindex")
|
||||
target.setAttribute("tabindex", "-1")
|
||||
let origTabIndex = target.tabIndex
|
||||
target.tabIndex = -1
|
||||
target.focus()
|
||||
window.setTimeout(() => {
|
||||
if (origTabIndex) {
|
||||
target.setAttribute("tabindex", origTabIndex)
|
||||
} else {
|
||||
target.removeAttribute("tabindex")
|
||||
}
|
||||
}, 1000)
|
||||
target.tabIndex = origTabIndex
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +193,7 @@ window.addEventListener("phx:page-loading-start", info => topbar.show())
|
|||
window.addEventListener("phx:page-loading-stop", info => topbar.hide())
|
||||
|
||||
// Accessible routing
|
||||
window.addEventListener("phx:page-loading-stop", () => window.requestAnimationFrame(routeUpdated))
|
||||
window.addEventListener("phx:page-loading-stop", routeUpdated)
|
||||
|
||||
window.addEventListener("js:exec", e => e.target[e.detail.call](...e.detail.args))
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div id="mobile-sidebar-container" class="fixed inset-0 flex z-40 lg:hidden" aria-modal="true" style="display: none;">
|
||||
<div id="mobile-sidebar-container" class="fixed inset-0 flex z-40 lg:hidden" aria-modal="true" style="display: none;" role="region">
|
||||
<div
|
||||
class="fixed inset-0 bg-gray-600 bg-opacity-75"
|
||||
phx-click={hide_mobile_sidebar()}>
|
||||
|
@ -49,7 +49,7 @@
|
|||
|
||||
|
||||
<!-- Static sidebar for desktop -->
|
||||
<div class="hidden lg:flex lg:flex-shrink-0">
|
||||
<div class="hidden lg:flex lg:flex-shrink-0" role="region">
|
||||
<div class="flex flex-col w-64 border-r border-gray-200 pt-5 pb-4 bg-gray-100">
|
||||
<div class="flex items-center flex-shrink-0 px-6">
|
||||
<.link navigate={home_path(@current_user)}>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<!-- Main column -->
|
||||
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
||||
<!-- Search header -->
|
||||
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200 lg:hidden">
|
||||
<div class="relative z-10 flex-shrink-0 flex h-16 bg-white border-b border-gray-200 lg:hidden" role="navigation">
|
||||
<button type="button"
|
||||
id="show-mobile-sidebar"
|
||||
aria-expanded="false"
|
||||
|
|
Loading…
Reference in a new issue