All Projects → svinkle → togglific

svinkle / togglific

Licence: MIT license
Do you find web animations distracting? Togglific provides a distraction-free web experience!

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to togglific

accessibility-testing-tools
A collection of useful tools for accessibility testing and debugging in the browser, online and desktop
Stars: ✭ 18 (+5.88%)
Mutual labels:  accessibility, bookmarklet, a11y
HTML-Lint
A code quality bookmarklet and command-line tool
Stars: ✭ 20 (+17.65%)
Mutual labels:  accessibility, bookmarklet, a11y
lint-html-with-css
Lint HTML with CSS. A collection of CSS snippets from the hashtag #lintHTMLwithCSS on twitter. These CSS snippets intend to warn developers about common mistakes made in HTML.
Stars: ✭ 35 (+105.88%)
Mutual labels:  accessibility, a11y
accessible-name-automation-proof-of-concept
This is an experiment based on Accessibility Object Model (AOM). It tries to demonstrate that it is theoretically possible (in a certain way) to predict what the screen reader will say by focusing on semantic and non semantic elements with a bit of automated testing, thus reducing the need for manual testing.
Stars: ✭ 15 (-11.76%)
Mutual labels:  accessibility, a11y
a11y-checker
Identifies accessibility issues in HTML markup.
Stars: ✭ 103 (+505.88%)
Mutual labels:  accessibility, a11y
gifa11y
Gifa11y is a customizable vanilla javascript plugin that easily adds accessible play/pause buttons to animated GIFs.
Stars: ✭ 23 (+35.29%)
Mutual labels:  a11y, gif
Tanaguru
Automated accessibility (a11y) testing tool, with emphasis on reliablity and automation
Stars: ✭ 116 (+582.35%)
Mutual labels:  accessibility, a11y
omnibang
Browser extension for searching many sites directly from address bar using bangs provided by DuckDuckGo.
Stars: ✭ 31 (+82.35%)
Mutual labels:  accessibility, browser-extension
ari
Accessible unstyled vue components
Stars: ✭ 22 (+29.41%)
Mutual labels:  accessibility, a11y
chusho
A library of bare & accessible components and tools for Vue.js 3
Stars: ✭ 47 (+176.47%)
Mutual labels:  accessibility, a11y
openacr
OpenACR is a digital native Accessibility Conformance Report (ACR). The initial development is based on Section 508 requirements. The main goal is to be able to compare the accessibility claims of digital products and services. A structured, self-validated, machine-readable documentation will provide for this.
Stars: ✭ 61 (+258.82%)
Mutual labels:  accessibility, a11y
a11y-contracting
Building Accessibility Best Practices into Contracting
Stars: ✭ 43 (+152.94%)
Mutual labels:  accessibility, a11y
jquery-accessible-simple-tooltip-aria
jQuery accessible simple tooltip window, using ARIA
Stars: ✭ 22 (+29.41%)
Mutual labels:  accessibility, a11y
cauldron
cauldron.dequelabs.com/
Stars: ✭ 50 (+194.12%)
Mutual labels:  accessibility, a11y
Turn-Off-the-Lights-Firefox-extension-WebExtensions
Firefox extension (WebExtensions)
Stars: ✭ 19 (+11.76%)
Mutual labels:  accessibility, browser-extension
eufemia
DNB Design System
Stars: ✭ 38 (+123.53%)
Mutual labels:  accessibility, a11y
accessibility-resources
Screen reader and WCAG testing resources to maintain a consistent approach to testing and documenting behaviour.
Stars: ✭ 25 (+47.06%)
Mutual labels:  accessibility, a11y
bones
Accessible HTML code patterns for common UI widgets such as tabs, menus, dialogs, etc.
Stars: ✭ 79 (+364.71%)
Mutual labels:  accessibility, a11y
Turn-Off-the-Lights-Chrome-extension
Chrome extension
Stars: ✭ 81 (+376.47%)
Mutual labels:  accessibility, browser-extension
agnostic-axe
Framework agnostic accessibility reporter, powered by axe-core
Stars: ✭ 80 (+370.59%)
Mutual labels:  accessibility, a11y

Build Status npm version

Togglific

Enjoy a distraction-free web experience!

Toggle web animations on or off; for people with vestibular disorders, who are prone to motion sickness, or who find animations distracting!

Features

The following animated elements will paused on button click:

  • CSS Animations (animation and transform properties)
  • JavaScript Animations (requestAnimationFrame() method)
  • SVG animations
  • jQuery animations
  • Animated .gif and .webp images
  • HTML <video> elements
  • Targets same-domain <iframe> elements for all of the above

Demo

Check out the demo section to see Togglific in action!


Products

Togglific generates three separate products:

  1. Stand-alone script: For development teams to implement into their own projects and setup custom controls. This covers all animations.

    See the script options for more details on how to customize for your own needs!

  2. Bookmarklet: For anyone wishing to quickly pause animations on the current page their viewing.

    The bookmarklet also covers all animations and has the greatest browser support.

    Note: State does not persist; the user needs to click the bookmarklet control on each page load to pause animations.

  3. Browser extension: Available for Chrome and Firefox.

    With this, localStorage is used to persist the selection. The user only has to click the button once to always disable animations for the current domain.

    Note: At this time, the extension does not toggle JavaScript based animations due to technical limitations.

Let's look at each in more detail:

Stand-alone script

Usage

  1. Include the lib at the bottom of your page:
<script src="dist/stand-alone/togglific.js"></script>
  1. Create a new instance and supply the id of your toggle button:
<script>
  new Togglific.Togglific([options], 'toggler');
</script>

See script options for more info on the [options] parameter.

  1. Add the toggle button to your HTML:
<button id="toggler">Toggle Animations!</button>

npm Package

You can also grab the stand-alone script and include it into your project via npm!

Installation
npm install togglific
Usage
  1. In your JavaScript file…
const toggler = require('togglific');
// …
new toggler.Togglific([options], 'toggler');
  1. Then add a <button> element as a toggle.
<button id="toggler">Toggle Animations!</button>

Bookmarklet

Simply drag the Bookmarklet! link to your bookmarks bar in your browser and you're all set!

Browser extensions

Install the browser extension from one the following browser vendor plugin repositories!

Chrome

Install the browser extension from the Chrome Web Store!

Firefox

Install the browser extension from Firefox Add-ons!

Edge

Install the browser extension from the Microsoft Store!

Coming soon!


Script Options

The stand-alone script accepts options when using the script on your page or website.

Options are sent in the format of an object literal to the Togglific instance as the first parameter.

There are a few things you can set for options, including:

Custom CSS

If you want to customize, you can pass specific CSS to the object. By default, this CSS would be applied to all elements:

new Togglific.Togglific(
  {
    css: {
      height: 'auto',
      padding: '10px'
    }
  },
  'toggler'
);

Specify your own selectors

If you want only specific elements to be effected, you can add CSS selectors as a string:

new Togglific.Togglific(
  {
    selectors: 'section, .content'
  },
  'toggler'
);

Combine both options, Custom CSS and Specify your own Selectors to have specific elements only be effected with the desired CSS.

Exclude modules

By default, all components are included for toggling animations. If you'd prefer to remove a specific component to always allow animations, you can set it to be excluded.

For example, to exempt CSS and jQuery:

new Togglific.Togglific(
  {
    modules: {
      css: false,
      jquery: false
    }
  },
  'toggler'
);

Default options

To leave everything as-is and accept all components, set the instance [options] parameter to null.

new Togglific.Togglific(null, 'toggler');

Contributing

Contributions are always welcome! Please read the Contributing document if you'd like to help out with the project.

License

This project and its source code is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].