mirror of
https://github.com/fly-apps/live_beats.git
synced 2025-01-10 15:35:23 +00:00
Set aria-current
on active tab to indicate to screen readers which is selected.
This commit is contained in:
parent
62e00dc447
commit
6d95137d1f
1 changed files with 2 additions and 0 deletions
|
@ -36,6 +36,7 @@ defmodule LiveBeatsWeb.LayoutView do
|
||||||
<.link
|
<.link
|
||||||
redirect_to={profile_path(@current_user)}
|
redirect_to={profile_path(@current_user)}
|
||||||
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :profile, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
|
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :profile, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
|
||||||
|
aria-current={if @active_tab == :profile, do: "true", else: "false"}
|
||||||
>
|
>
|
||||||
<.icon name={:music_note} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
|
<.icon name={:music_note} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
|
||||||
My Songs
|
My Songs
|
||||||
|
@ -44,6 +45,7 @@ defmodule LiveBeatsWeb.LayoutView do
|
||||||
<.link
|
<.link
|
||||||
redirect_to={Routes.settings_path(Endpoint, :edit)}
|
redirect_to={Routes.settings_path(Endpoint, :edit)}
|
||||||
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :settings, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
|
class={"text-gray-700 hover:text-gray-900 group flex items-center px-2 py-2 text-sm font-medium rounded-md #{if @active_tab == :settings, do: "bg-gray-200", else: "hover:bg-gray-50"}"}
|
||||||
|
aria-current={if @active_tab == :settings, do: "true", else: "false"}
|
||||||
>
|
>
|
||||||
<.icon name={:adjustments} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
|
<.icon name={:adjustments} outlined class="text-gray-400 group-hover:text-gray-500 mr-3 flex-shrink-0 h-6 w-6"/>
|
||||||
Settings
|
Settings
|
||||||
|
|
Loading…
Reference in a new issue