Screen reader introduction

To add support for screen readers, include the "screenReader" add-on .js and .css files and use the screenReader options.

<head>
   <script src="path/to/jquery.js" type="text/javascript"></script>
   <script src="path/to/jquery.mmenu.min.js" type="text/javascript"></script>
   <script src="path/to/jquery.mmenu.screenreader.min.js" type="text/javascript"></script>
   <link href="path/to/jquery.mmenu.css" type="text/css" rel="stylesheet" />
   <link href="path/to/jquery.mmenu.screenreader.css" type="text/css" rel="stylesheet" />
   <script type="text/javascript">
      $(document).ready(function() {
         $("#my-menu").mmenu({
            screenReader: {
               // screenReader options
            }
         });
      });
   </script>

Options for the "screenReader" add-on

Option Default value Datatype Description
screenReader A map of options or true for screenReader.aria and screenReader.text.
{
aria false Boolean Whether or not to automatically add and update the aria-hidden and aria-haspopup attributes.
text false Boolean Whether or not to add a "screen reader only" text for anchors that normally don't have text.
}

Configuration for the "screenReader" add-on

Option Default value Datatype Description
screenReader
{
text
{
closeMenu "Close menu" String The screen reader text for anchors that close the menu.
closeSubmenu "Close submenu" String The screen reader text for anchors that close a submenu.
openSubmenu "Open submenu" String The screen reader text for anchors that open a submenu.
toggleSubmenu "Toggle submenu" String The screen reader text for anchors that toggle a submenu.
}
}

API methods for the "screenReader" add-on

The "screenReader" add-on has no API methods.

SCSS variables for the "screenReader" add-on

The "screenReader" add-on has no SCSS variables.

SCSS mixins for the "screenReader" add-on

The "screenReader" add-on has no SCSS mixins.

Next add-on:
Scroll bug fix