a11y-dialog

A very lightweight and flexible accessible modal dialog script.

MIT License

Downloads
235.9K
Stars
2.4K
Committers
33

Bot releases are hidden (Show)

a11y-dialog - 8.0.4 Latest Release

Published by KittyGiraudel about 1 year ago

What's Changed

  • Try/catch a new DOM query which could fail in unsupported browsers (a446b5cd02be0e45c6619a031b9b237ce9e4c675)

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.3...8.0.4

a11y-dialog - 8.0.3

Published by KittyGiraudel about 1 year ago

What's Changed

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.2...8.0.3

a11y-dialog - 8.0.2

Published by KittyGiraudel about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.1...8.0.2

a11y-dialog - 8.0.1

Published by KittyGiraudel about 1 year ago

What's Changed

  • Update some dev dependencies (#550, #551, #552, #554)
  • Ensure the banner comment in the dist files mention v8+

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.0...8.0.1

a11y-dialog - 8.0.0

Published by KittyGiraudel about 1 year ago

What’s Changed

This version focuses on source code optimization by leveraging TypeScript, ES6 and DOM APIs. Besides the events signature having changed, version 8 should be mostly backward-compatible provided you do not rely on internal properties and do not need Internet Explorer support. If you do, stick to v7.

Read the migration guide.

Breaking

  • The library now longer supports Internet Explorer (by @mxmason in #382).
  • Pseudo-private properties prefixed with an underscore (e.g. _id) are no longer prefixed, and marked as private in TypeScript instead (by @mxmason in #379).
  • All events now go through cancellable DOM CustomEvent objects instead of a custom event system, and the event listener signature has changed (#239).

Potentially breaking

  • The focus trap now accounts for Shadow DOM (by @mxmason in #397 and #459, solving #322).
  • The focus trap now accounts for summary elements (f600fb0e1df9d6069b874150e07ed1d2d3b9e455).
  • The focus trap no longer considers children of disabled fieldset elements as focusable (#462).
  • The focus trap no longer considers elements within disabled, inert and hidden parents as focusable (#464).

Non-breaking

  • The code has been rewritten in TypeScript (by @mxmason in #379 and #380).
  • The code now leverages ES6 syntax such as classes, optional chaining operator and arrow functions (by @mxmason in #375 and #376).
  • The dist folder is no longer part of the repository, only the source files remain (by @mxmason in #374).
  • Click events are now listened to at the document level (by @mxmason in #387, solving #367).
  • The focus-trap event listener is now bound on the dialog container instead of the body element (by @mxmason in #380).
  • The auto-instantiation of dialogs has been simplified but remains functionally unchanged (by @mxmason in #380).
  • A lot of development dependencies have been updated.

New Contributors

  • Huge thanks to @mxmason for their extensive contributions with version 8, from the TypeScript rewrite to the Shadow DOM support.
  • Special thanks to Alice Boxhall for her kind help with the Shadow DOM implementation.

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.3...8.0.0

a11y-dialog - 7.5.3

Published by KittyGiraudel about 1 year ago

What's Changed

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.2...7.5.3

a11y-dialog - 6.1.2

Published by KittyGiraudel about 1 year ago

What's Changed

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/6.1.1...6.1.2

a11y-dialog - 7.5.2

Published by KittyGiraudel about 2 years ago

What's Changed

  • Fix incorrect handling of nested dialogs (#399, #400)
  • Remove obsolete styles from the fixture files (754d56cc8f2886e5a1dba1d984dc93f52508ef9f)
  • Update focusable-selectors dependency (c61526e1dd4468006807c7dc4609534f5ac5c604)
  • Update dev dependencies (c22e463e0f6f0ed938ed781e6317d765707a455e)

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.1...7.5.2

a11y-dialog - 7.5.1

Published by KittyGiraudel about 2 years ago

What's Changed

  • Add missing type for ‘shown’ property (#394)

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.0...7.5.1

a11y-dialog - 7.5.0

Published by KittyGiraudel over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.4.0...7.5.0

a11y-dialog - 7.4.0

Published by KittyGiraudel over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/KittyGiraudel/a11y-dialog/compare/7.3.0...7.3.1

a11y-dialog - 7.3.0

Published by KittyGiraudel about 3 years ago

  • Dispatch DOM events alongside custom ones so the lifecycle events can be reacted to for auto-instantiated dialogs as well (#237, #238)
  • Update dev dependencies (#229, #230, #231, #232, #233, #234, #235, #236)
a11y-dialog - 7.2.0

Published by KittyGiraudel about 3 years ago

  • Focus the dialog container instead of its first focusable element on dialog open (#228)
  • Update focusable-selectors (f661846a9d8f475e07ab6e824ceaab4fe4f376cd)
  • Apply Rollup cosmetic change to ESM exports (22f7f57fddb87c647fa00da1bc0f261e07137e4a)
a11y-dialog - 7.1.0

Published by KittyGiraudel over 3 years ago

  • Provide a focus trap escape hatch for advanced integrations (#178)
a11y-dialog - 7.0.3

Published by KittyGiraudel over 3 years ago

  • Move back the latest tag onto the v7 major
a11y-dialog - 6.1.1

Published by KittyGiraudel over 3 years ago

  • Fix focus restoration being too loose (b3a15e3622d8dd733236bedc39469ea8a173675f)
a11y-dialog - 7.0.2

Published by KittyGiraudel over 3 years ago

  • Fix focus restoration being too loose (#175)
a11y-dialog - 7.0.1

Published by KittyGiraudel over 3 years ago

  • Remove obsolete usage of the targets argument (5909cacb4e764da10d8ff77ec5bbd439c21ebad3)
a11y-dialog - 7.0.0

Published by KittyGiraudel over 3 years ago

Version 7 of a11y-dialog aims at reducing complexity, both in terms of implementation, but also in terms of usage.

It is not backward compatible with version 6 (hence the major version bump). The update should not be overly difficult, but requires development work. Read the migration guide.

  • [Breaking] Drop support for the native <dialog> element (and the open HTML attribute). It is inconsistent, and already actively discouraged in the documentation. There is a lot of logic around supporting its side-effects which we would be better off. (#158, #163)

  • [Breaking] Use aria-modal="true" to no longer make the main content container(s) inert with aria-hidden="true". This significantly reduces the markup expectations and limit the risks of passing the incorrect main content container(s) to the library since it no longer needs them. (#155, #164)

As a result, using a11y-dialog should become significantly easier, and the script size dropped ~20% (now around 1.3Kb).

a11y-dialog - 7.0.0-rc.1

Published by KittyGiraudel over 3 years ago

Version 7 of a11y-dialog aims at reducing complexity, both in terms of implementation, but also in terms of usage.

It is not backward compatible with version 6 (hence the major version bump). The update should not be overly difficult, but requires development work. Read the migration guide.

  • [Breaking] Drop support for the native <dialog> element (and the open HTML attribute). It is inconsistent, and already actively discouraged in the documentation. There is a lot of logic around supporting its side-effects which we would be better off. (#158, #163)

  • [Breaking] Use aria-modal="true" to no longer make the main content container(s) inert with aria-hidden="true". This significantly reduces the markup expectations and limit the risks of passing the incorrect main content container(s) to the library since it no longer needs them. (#155, #164)

As a result, using a11y-dialog should become significantly easier, and the script size dropped ~20% (now around 1.3Kb).