All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fixed: Also check for
inert
functions onHTMLElement
when initializing.
- Removed: Dependency on
RequireBundle
library.
- Changed: Expose function
initTriggers
to allow reinitializing triggers after adding or replacing sections on the page which contains flyout block trigger elements.
- Fixed: Error on set
inert
functions preventing animations to work while openning a flyout-block.
- Fixed: Only set flyout-block content element
role
attribute when opening it, instead of setting at initialization. - Fixed: Set all sibling elements up the flyout-block element tree as
inert
, instead of just the elements siblings.
- Fixed: Critical error when initializing a flyout-block trigger which contained a
href
attribute that didn't point to an element in the page.
- Changed: Default focus to the flyout content instead of the first focusable element. Use the attribute
data-autofocus
on the flyout element to focus on the first focusable element. - Changed: Default open/close animations to use
fade-in-up
andfade-out-down
.
- Fixed:
fade-out-down
animation as moving up instead of down.
- Added: Support for flyout block accessible description generated from an element marked with
data-flyout-description
. - Added: Support for flyout block accessible name generated from the first found heading element.
- Added: Support for keyboard events on non-button trigger elements.
- Added: Make all siblings of the flyout blocks as
inert
during the time it is open. Letting users focus only on elements inside the currently displayed flyout block. - Added: Add
inert
polyfill, see more information at the Inert polyfill repository. - Added: Set focus to the first focusable element in the flyout content by default, or to the element marked as
data-autofocus
if focusabled, and allow developers to define a manual focus mode withdata-flyout-manual-focus
, otherwise focus on the flyout content. - Added: Add attribute
role
to the flyout block element todialog
oralertdialog
with support to set the value viadata-flyout-role
. - Added: Add support to the attribute
hidden
on flyout block elements to hide content for when JavaScript and CSS is unavailable. - Added: Support to target flyout blocks using the
href
of a link attribute. - Added: Set trigger elements
role
tobutton
. - Added: Support to release
disabled
andaria-hidden
on trigger elements at initialization. - Added: Set focus back to the element that had the focus previously to opening the flyout block.
- Fixed: Only set flyout styles after initializing the script and setting the a class to the
body
element.
- Removed: unnecessary dependency
hammerjs
.
- Initial commit.