# makeup-modal

> Applies modal accessibility requirements to any element

Latest version **0.7.0** (published 2026-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install makeup-modal
pnpm add makeup-modal
yarn add makeup-modal
bun add makeup-modal
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2026-03-31 |
| First published | 2017-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Ian McBurnie |
| Maintainers | dylanpiercey, sendlo, ianmcburnie, agliga, saiponnada, artblue, lulavalva |
| Keywords | makeup, ebay, accessibility, a11y |

## Links

- npm: https://www.npmjs.com/package/makeup-modal
- Repository: https://github.com/makeup/makeup-js.git#master
- Homepage: https://github.com/makeup/makeup-js/tree/master#readme
- Issues: https://github.com/makeup/makeup-js/issues
- npm.io page: https://npm.io/package/makeup-modal

## Dependencies (2)

- [makeup-keyboard-trap](https://npm.io/package/makeup-keyboard-trap.md) ^0.6.0
- [makeup-screenreader-trap](https://npm.io/package/makeup-screenreader-trap.md) ^0.7.0

## Recent versions

- 0.7.0 (latest) — 2026-03-31
- 0.6.0 — 2026-03-31
- 0.5.8 — 2026-02-07
- 0.5.7 — 2025-08-19
- 0.5.5 — 2025-04-22
- 0.5.4 — 2024-12-20
- 0.5.3 — 2024-10-24
- 0.5.2 — 2024-09-03
- 0.5.1 — 2024-08-27
- 0.5.0 — 2024-06-23
- 0.4.2 — 2024-06-17
- 0.4.1 — 2022-02-11
- 0.4.0 — 2022-02-02
- 0.3.0 — 2021-07-10
- 0.2.1 — 2020-09-10
- … 8 more at https://npm.io/package/makeup-modal/versions

## README

# makeup-modal

Sets an element to a modal state using [makeup-keyboard-trap](https://github.com/makeup/makeup-js/tree/master/packages/core/makeup-keyboard-trap) and [makeup-screenreader-trap](https://github.com/makeup/makeup-js/tree/master/packages/core/makeup-screenreader-trap). All other elements become "inert".

## Experimental

This module is still in an experimental state, until it reaches v1 you must consider all minor releases as breaking changes.

```js
import { modal, unmodal } from "makeup-modal";

// set an element to modal
modal(document.querySelector("el"));

// reset the element to non-modal
unmodal();
```

## Install

```js
npm install makeup-modal
```

## Options

- `useHiddenProperty`: use the `hidden` property instead of `aria-hidden` to hide the surrounding DOM tree from all users, not just screen reader users (default: false)
- `hoist`: moves the element to `document.body` if it is nested deeper in the DOM, reducing the number of siblings and ancestor-siblings the traps need to hide (default: false)
- `wrap`: when the element is a direct body child, collects all other body children into a single inert container so one attribute can hide everything at once; intended to be used together with `hoist` (default: false)

## Events

- makeup-modal
- makeup-unmodal

---
_Source: https://npm.io/package/makeup-modal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
