New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Keyboard Navigation

Use Alt + w focus the RadFloatingActionButton control.

Then you can leverage the keyboard support that is enabled by default. Here are supported keys and user actions:

  • Enter or Space opens the speed-dial popup and moves the focus to first item or triggers click handler
  • Up arrow moves focus to the previous item
  • Down arrow moves focus to the next item
  • Esc closes the speed-dial popup
  • Home moves the focus to the first item
  • End moves the focus to the last item
  • DefaultVB.aspx
  • DefaultVB.aspx.vb
<%@ Page Language="vb" AutoEventWireup="true"  Inherits="Telerik.Web.Examples.FloatingActionButton.KeyboardNavigation.DefaultVB" CodeFile="DefaultVB.aspx.vb" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />

    <div class="demo-container" style="height: 300px; position: relative;">

        <script>
            function dialItemClicked(eventArguments) {
                window.radalert(eventArguments.item.label + " action");
            }
            $telerik.$(document).keydown(function (e) {
                if (e.altKey && e.keyCode === 87) {
                    var fab = $find("<%= RadFloatingActionButton1.ClientID %>");
                    fab.focus();
                }
            });
        </script>
        <telerik:RadWindowManager runat="server"></telerik:RadWindowManager>
        <telerik:RadFloatingActionButton runat="server" Size="Large" Shape="Pill" ID="RadFloatingActionButton1" Icon="share" PositionMode="Absolute" Align="BottomCenter">
            <AlignOffsetSettings X="50" Y="50" />
            <Items>
                <telerik:FloatingActionButtonItem Icon="download" Label="Download" OnClientClicked="dialItemClicked"></telerik:FloatingActionButtonItem>
                <telerik:FloatingActionButtonItem Icon="print" Label="Print" OnClientClicked="dialItemClicked"></telerik:FloatingActionButtonItem>
                <telerik:FloatingActionButtonItem Icon="email" Label="Email" OnClientClicked="dialItemClicked"></telerik:FloatingActionButtonItem>
            </Items>
        </telerik:RadFloatingActionButton>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance