Skip to content

Releases: adamchaboryk/gifa11y

Gifa11y 2.0.4

20 Nov 21:32
Compare
Choose a tag to compare
  • Ensure Gifa11y buttons are added before elements with [role="link"] and [role="button"] attributes.
  • Added a new prop, useDevicePixelRatio, to support scaling on high-resolution displays using window.devicePixelRatio.
  • Added a resize event listener to the canvas element to ensure it always matches the size of the original image.
  • Disabled the alpha channel, e.g., canvas.getContext("2d", { alpha: false }).
  • Performed minor code cleanup and reorganization.

Gifa11y 2.0.3

08 Jan 22:16
568fdc8
Compare
Choose a tag to compare
  • Buttons are now encapsulated within a web component to avoid CSS conflicts.
  • New prop buttonBorder to change properties of a play/pause button's border.

Gifa11y 2.0.2

13 Jun 15:50
Compare
Choose a tag to compare
  • Sync GitHub and NPM version number... 🤦‍♂️

Gifa11y 2.0.1

13 Jun 15:37
b5c3824
Compare
Choose a tag to compare

— Fixed GitHub pages

  • Published to npm. Install via npm i gifa11y

Gifa11y 2.0

13 Jun 14:01
Compare
Choose a tag to compare
  • Refactored & modularized. Less spaghetti code.
  • Added dev tooling & CSS/JavaScript linting.
  • New props and button style.
    • target: Use CSS selectors to target other images like .webp (that don't end with .gif), for example target: 'img[src$=".webp"]' or by class name.
    • showButtons: Boolean prop to show or hide Play/Pause buttons.
    • showGifText: Alternative button style. Boolean prop to show the text 'GIF' within the Play/Pause buttons.
  • CDN links added to README.md

Gifa11y 1.0.7

16 Dec 17:00
Compare
Choose a tag to compare

Replaced canvas.height assignment using an aspect ratio calculation which seems to work just fine with different sizes (vertical and landscape).

Thanks to @hugosolar

Gifa11y 1.0.6

22 Aug 13:52
Compare
Choose a tag to compare

Bug fix. Resolve maincontainer === undefined.

Thanks to @haykh

Gifa11y 1.0.5

30 Jun 20:18
Compare
Choose a tag to compare

Added vertical-align: middle to SVG and within button. Removed .webp support, given that animated webp is less common, and mostly used for static images. If any demand to have it back, I'll create a prop for it.

Gifa11y 1.0.4

07 Jan 19:49
Compare
Choose a tag to compare

Fixed a bug where GIFs within collapsed content would not display because the <img> tag will always have a clientWidth and clientHeight of 0 since it's not rendered content. Solution: added a fallback to use naturalWidth and naturalHeight for dimensions of generated canvas still of GIF.

Gifa11y 1.0.3

13 Dec 22:19
Compare
Choose a tag to compare

Support for .webp animations.