a11y-password-strength-meter 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ ## 1.0.0 - 2026-07-07
4
+
5
+ ### Added
6
+
7
+ - Initial stable release of `a11y-password-strength-meter`.
8
+ - Added the vanilla TypeScript password strength meter plugin for authored semantic password fields.
9
+ - Added local, explainable password scoring with requirement states for length, uppercase, lowercase, number, and symbol checks.
10
+ - Added accessible UI updates with visible strength feedback, native progress semantics, requirement status text, and polite live announcements.
11
+ - Added package exports for the plugin API, docs metadata, and default CSS.
12
+ - Added Vite demos for the default meter, localized labels, status icons, and a registration form example.
13
+
14
+ ### Notes
15
+
16
+ - Password values are processed locally in the browser only. The package does not store, log, send, or include password values in lifecycle event detail.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vasilis Mitsaras
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,285 @@
1
+ # A11y Password Strength Meter
2
+
3
+ Accessible password strength feedback for semantic password fields, built as a vanilla TypeScript plugin.
4
+
5
+ The package is intentionally small. It provides visual feedback, non-visual feedback, native progress semantics, a requirement checklist, and polite live announcements without a framework, backend service, external password API, password storage, or password-strength dependency.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install a11y-password-strength-meter
11
+ ```
12
+
13
+ ```bash
14
+ pnpm add a11y-password-strength-meter
15
+ ```
16
+
17
+ ```bash
18
+ yarn add a11y-password-strength-meter
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ Author a data-root element near the password field, then initialize the meters in the current document. Importing the package does not auto-initialize the plugin.
24
+
25
+ ```ts
26
+ import { initPasswordStrengthMeters } from "a11y-password-strength-meter";
27
+ import "a11y-password-strength-meter/styles.css";
28
+
29
+ initPasswordStrengthMeters();
30
+ ```
31
+
32
+ ## CSS
33
+
34
+ Import the default styles when you want the packaged visual treatment:
35
+
36
+ ```ts
37
+ import "a11y-password-strength-meter/styles.css";
38
+ ```
39
+
40
+ The plugin styles use the `.a11y-password-strength-meter` BEM block. Public custom properties are prefixed with `--a11y-password-strength-meter-*`:
41
+
42
+ ```css
43
+ .a11y-password-strength-meter {
44
+ --a11y-password-strength-meter-radius: 999px;
45
+ --a11y-password-strength-meter-gap: 0.5rem;
46
+ --a11y-password-strength-meter-danger: #b3261e;
47
+ --a11y-password-strength-meter-warning: #946200;
48
+ --a11y-password-strength-meter-good: #176b45;
49
+ --a11y-password-strength-meter-strong: #0c492e;
50
+ }
51
+ ```
52
+
53
+ The default CSS includes progress states for `data-strength="too-weak"`, `weak`, `fair`, `strong`, and `very-strong`, visible checklist status text, and reduced-motion safeguards.
54
+
55
+ ## HTML Structure
56
+
57
+ Author the password field, helper text, visible feedback, and requirement checklist in HTML so the page remains understandable before JavaScript runs.
58
+
59
+ ```html
60
+ <label for="password">Create password</label>
61
+ <input
62
+ id="password"
63
+ name="password"
64
+ type="password"
65
+ autocomplete="new-password"
66
+ aria-describedby="password-help password-strength-feedback"
67
+ />
68
+
69
+ <p id="password-help">
70
+ Use at least 12 characters with uppercase and lowercase letters, a number,
71
+ and a symbol.
72
+ </p>
73
+
74
+ <div
75
+ data-a11y-password-strength-meter
76
+ data-input-id="password"
77
+ data-feedback-id="password-strength-feedback"
78
+ >
79
+ <p id="password-strength-feedback">Password strength: Not rated</p>
80
+ <ul
81
+ class="a11y-password-strength-meter__requirements"
82
+ aria-label="Password requirements"
83
+ >
84
+ <li data-requirement="length" data-met="false">
85
+ <span class="a11y-password-strength-meter__requirement-status">
86
+ Needed
87
+ </span>
88
+ <span class="a11y-password-strength-meter__requirement-text">
89
+ At least 12 characters
90
+ </span>
91
+ </li>
92
+ <li data-requirement="uppercase" data-met="false">
93
+ <span class="a11y-password-strength-meter__requirement-status">
94
+ Needed
95
+ </span>
96
+ <span class="a11y-password-strength-meter__requirement-text">
97
+ Includes an uppercase letter
98
+ </span>
99
+ </li>
100
+ <li data-requirement="lowercase" data-met="false">
101
+ <span class="a11y-password-strength-meter__requirement-status">
102
+ Needed
103
+ </span>
104
+ <span class="a11y-password-strength-meter__requirement-text">
105
+ Includes a lowercase letter
106
+ </span>
107
+ </li>
108
+ <li data-requirement="number" data-met="false">
109
+ <span class="a11y-password-strength-meter__requirement-status">
110
+ Needed
111
+ </span>
112
+ <span class="a11y-password-strength-meter__requirement-text">
113
+ Includes a number
114
+ </span>
115
+ </li>
116
+ <li data-requirement="symbol" data-met="false">
117
+ <span class="a11y-password-strength-meter__requirement-status">
118
+ Needed
119
+ </span>
120
+ <span class="a11y-password-strength-meter__requirement-text">
121
+ Includes a symbol
122
+ </span>
123
+ </li>
124
+ </ul>
125
+ </div>
126
+ ```
127
+
128
+ Supported `data-requirement` values are `length`, `uppercase`, `lowercase`, `number`, and `symbol`. For the length requirement, `data-length` overrides the plugin-level `minLength`.
129
+
130
+ ## API
131
+
132
+ ### `A11yPasswordStrengthMeter`
133
+
134
+ The plugin class for one `[data-a11y-password-strength-meter]` root. Instances expose:
135
+
136
+ - `element`: the root element.
137
+ - `root`: the root element.
138
+ - `messages`: optional message overrides.
139
+ - `update(options?)`: recalculates the UI from the observed input.
140
+ - `destroy()`: removes input listeners, cleans plugin-added `aria-describedby` values, clears initialized state, and dispatches `a11y-password-strength-meter:destroy`.
141
+
142
+ ### `createPasswordStrengthMeter(root, options?)`
143
+
144
+ Configures and initializes one root element. Duplicate initialization returns the existing instance.
145
+
146
+ ```ts
147
+ import { createPasswordStrengthMeter } from "a11y-password-strength-meter";
148
+
149
+ const meter = document.querySelector("[data-a11y-password-strength-meter]");
150
+
151
+ if (meter instanceof HTMLElement) {
152
+ createPasswordStrengthMeter(meter, {
153
+ inputId: "password",
154
+ feedbackId: "password-strength-feedback",
155
+ minLength: 12,
156
+ announce: true
157
+ });
158
+ }
159
+ ```
160
+
161
+ ### `initPasswordStrengthMeters(options?)`
162
+
163
+ Initializes every `[data-a11y-password-strength-meter]` root in the current document. In non-browser environments without `document`, it returns an empty array.
164
+
165
+ ### `getPasswordStrength(password, options?)`
166
+
167
+ Returns a local, explainable score and requirement state. Password values are not logged, stored, sent over the network, written into attributes, or included in lifecycle event detail.
168
+
169
+ ### `PASSWORD_STRENGTH_METER_EVENTS`
170
+
171
+ Exports the lifecycle event names:
172
+
173
+ - `init`: `a11y-password-strength-meter:init`
174
+ - `change`: `a11y-password-strength-meter:change`
175
+ - `destroy`: `a11y-password-strength-meter:destroy`
176
+
177
+ ## Options And Attributes
178
+
179
+ | Option | Data attribute | Description |
180
+ | --- | --- | --- |
181
+ | `inputId` | `data-input-id` | ID of the password input the plugin observes. |
182
+ | `feedbackId` | `data-feedback-id` | ID assigned to the visible strength feedback. Defaults to `password-strength-feedback`. |
183
+ | `minLength` | `data-min-length` | Minimum character count for the length requirement. Defaults to `12`. |
184
+ | `announce` | `data-announce` | Set to `false` to disable polite live announcements. |
185
+ | `messages` | localized `data-*` attributes | Overrides labels, templates, ARIA labels, error messages, or requirement text. |
186
+
187
+ Localized text can be customized with data attributes such as `data-strength-label-fair`, `data-met-text`, `data-needed-text`, `data-strength-template`, `data-requirements-summary-template`, `data-live-template`, `data-progress-label`, `data-progress-value-template`, `data-requirements-label`, `data-input-unconfigured-message`, and `data-input-missing-message`.
188
+
189
+ ### Localization Dev Notes
190
+
191
+ The localized demo in `localized.html` keeps the same scoring logic and changes only authored text plus message overrides. To achieve another locale, set the page or container `lang`, translate the label, helper text, feedback paragraph, and requirement text, then override the strength labels, status words, and templates with `data-*` attributes or the JavaScript `messages` option.
192
+
193
+ Keep `aria-describedby` connected to both helper and feedback text so assistive technologies receive the localized instructions and current strength result.
194
+
195
+ ## Events
196
+
197
+ Lifecycle events bubble and include the plugin instance in `detail.instance`.
198
+
199
+ | Event | Detail |
200
+ | --- | --- |
201
+ | `a11y-password-strength-meter:init` | `{ instance }` |
202
+ | `a11y-password-strength-meter:change` | `{ instance, label, metCount, result }` |
203
+ | `a11y-password-strength-meter:destroy` | `{ instance }` |
204
+
205
+ Event detail never includes the password value.
206
+
207
+ ## Accessibility Notes
208
+
209
+ - The password field needs a visible `<label>`.
210
+ - Helper text and visible strength feedback should be connected with `aria-describedby`.
211
+ - The plugin renders a native `<progress>` element with a visible strength label and count text.
212
+ - The polite live region announces only when the strength label changes.
213
+ - Color is never the only state cue; the checklist and visible text remain available.
214
+ - Keyboard behavior uses native form controls and browser defaults.
215
+ - Default CSS respects `prefers-reduced-motion`.
216
+
217
+ More detail is available in [docs/accessibility-notes.md](docs/accessibility-notes.md). Still test with your target browsers and assistive technologies before shipping a production form.
218
+
219
+ ## Security Boundaries
220
+
221
+ This package is local UI guidance only. It does not validate credentials for a backend and it is not a complete security system.
222
+
223
+ It never intentionally:
224
+
225
+ - Stores the password.
226
+ - Sends the password over the network.
227
+ - Logs the password.
228
+ - Writes password values into DOM attributes.
229
+ - Includes password values in lifecycle event detail.
230
+
231
+ ## Examples And Demos
232
+
233
+ - Root Vite demos: `index.html`, `localized.html`, and `status-icons.html`.
234
+ - Registration form demo: `register-form.html` combines A11y Form Validator with local password-strength feedback on a semantic signup form.
235
+ - GitHub Pages demo: <https://vmitsaras.github.io/a11y-password-strength-meter/>.
236
+
237
+ Run the local demo app with:
238
+
239
+ ```bash
240
+ npm run dev
241
+ ```
242
+
243
+ Build the published demo output with:
244
+
245
+ ```bash
246
+ npm run demo:build
247
+ ```
248
+
249
+ Build the GitHub Pages version with the project-page base path:
250
+
251
+ ```bash
252
+ GITHUB_PAGES=true npm run demo:build
253
+ ```
254
+
255
+ ## GitHub Pages Deployment
256
+
257
+ This repo is configured for GitHub Actions deployment. The workflow builds the Vite demo into `demo-dist`, adds `.nojekyll`, and uploads that folder to GitHub Pages.
258
+
259
+ Repository settings should use:
260
+
261
+ - Pages source: GitHub Actions.
262
+ - Branch trigger: `main`.
263
+ - Expected URL: `https://vmitsaras.github.io/a11y-password-strength-meter/`.
264
+
265
+ ## Docs Metadata
266
+
267
+ Docs metadata is available as a named export for aggregation in Astro/Starlight or another docs site:
268
+
269
+ ```ts
270
+ import { docs } from "a11y-password-strength-meter/docs";
271
+ ```
272
+
273
+ ## Verification
274
+
275
+ Before release or public sharing, run:
276
+
277
+ ```bash
278
+ npm run typecheck
279
+ npm run test
280
+ npm run build
281
+ npm run pack:check
282
+ npm run demo:build
283
+ ```
284
+
285
+ Manual QA guidance is available in [docs/manual-qa-script.md](docs/manual-qa-script.md) and [docs/accessibility-test-scenarios.md](docs/accessibility-test-scenarios.md).
package/dist/docs.d.ts ADDED
@@ -0,0 +1,88 @@
1
+ //#region src/docs.d.ts
2
+ interface PluginDocs {
3
+ slug: string;
4
+ name: string;
5
+ packageName: string;
6
+ description: string;
7
+ repo?: string;
8
+ npm?: string;
9
+ demo?: string;
10
+ install: {
11
+ npm: string;
12
+ pnpm: string;
13
+ yarn: string;
14
+ };
15
+ usage: string;
16
+ selectors?: string[];
17
+ keyboard?: Array<{
18
+ key: string;
19
+ description: string;
20
+ }>;
21
+ accessibility?: string[];
22
+ limitations?: string[];
23
+ api: Array<{
24
+ name: string;
25
+ type: string;
26
+ description: string;
27
+ }>;
28
+ events?: Array<{
29
+ name: string;
30
+ detail: string;
31
+ description: string;
32
+ }>;
33
+ styles?: {
34
+ import: string;
35
+ block: string;
36
+ customProperties: string[];
37
+ };
38
+ examples?: Array<{
39
+ name: string;
40
+ description: string;
41
+ path: string;
42
+ }>;
43
+ }
44
+ declare const docs: {
45
+ slug: string;
46
+ name: string;
47
+ packageName: string;
48
+ description: string;
49
+ repo: string;
50
+ npm: string;
51
+ demo: string;
52
+ install: {
53
+ npm: string;
54
+ pnpm: string;
55
+ yarn: string;
56
+ };
57
+ usage: string;
58
+ selectors: string[];
59
+ keyboard: {
60
+ key: string;
61
+ description: string;
62
+ }[];
63
+ accessibility: string[];
64
+ limitations: string[];
65
+ api: {
66
+ name: string;
67
+ type: string;
68
+ description: string;
69
+ }[];
70
+ events: {
71
+ name: string;
72
+ detail: string;
73
+ description: string;
74
+ }[];
75
+ styles: {
76
+ import: string;
77
+ block: string;
78
+ customProperties: string[];
79
+ };
80
+ examples: {
81
+ name: string;
82
+ description: string;
83
+ path: string;
84
+ }[];
85
+ };
86
+ //#endregion
87
+ export { PluginDocs, docs };
88
+ //# sourceMappingURL=docs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.d.ts","names":[],"sources":["../src/docs.ts"],"mappings":";UAAiB,UAAA;EACf,IAAA;EACA,IAAA;EACA,WAAA;EACA,WAAA;EACA,IAAA;EACA,GAAA;EACA,IAAA;EACA,OAAA;IACE,GAAA;IACA,IAAA;IACA,IAAA;EAAA;EAEF,KAAA;EACA,SAAA;EACA,QAAA,GAAW,KAAA;IACT,GAAA;IACA,WAAA;EAAA;EAEF,aAAA;EACA,WAAA;EACA,GAAA,EAAK,KAAA;IACH,IAAA;IACA,IAAA;IACA,WAAA;EAAA;EAEF,MAAA,GAAS,KAAA;IACP,IAAA;IACA,MAAA;IACA,WAAA;EAAA;EAEF,MAAA;IACE,MAAA;IACA,KAAA;IACA,gBAAA;EAAA;EAEF,QAAA,GAAW,KAAA;IACT,IAAA;IACA,WAAA;IACA,IAAA;EAAA;AAAA;AAAA,cAIS,IAAA"}
package/dist/docs.js ADDED
@@ -0,0 +1,125 @@
1
+ //#region src/docs.ts
2
+ const docs = {
3
+ slug: "a11y-password-strength-meter",
4
+ name: "A11y Password Strength Meter",
5
+ packageName: "a11y-password-strength-meter",
6
+ description: "Accessible password strength feedback for semantic password fields, built as a vanilla TypeScript plugin.",
7
+ repo: "https://github.com/vmitsaras/a11y-password-strength-meter",
8
+ npm: "https://www.npmjs.com/package/a11y-password-strength-meter",
9
+ demo: "https://vmitsaras.github.io/a11y-password-strength-meter/",
10
+ install: {
11
+ npm: "npm install a11y-password-strength-meter",
12
+ pnpm: "pnpm add a11y-password-strength-meter",
13
+ yarn: "yarn add a11y-password-strength-meter"
14
+ },
15
+ usage: `import { initPasswordStrengthMeters } from "a11y-password-strength-meter";
16
+ import "a11y-password-strength-meter/styles.css";
17
+
18
+ initPasswordStrengthMeters();`,
19
+ selectors: [
20
+ "[data-a11y-password-strength-meter]",
21
+ "[data-input-id]",
22
+ "[data-feedback-id]",
23
+ "[data-requirement]",
24
+ "[data-requirement-status-text]",
25
+ ".a11y-password-strength-meter__requirements",
26
+ ".a11y-password-strength-meter__requirement-status",
27
+ ".a11y-password-strength-meter__requirement-text"
28
+ ],
29
+ keyboard: [{
30
+ key: "Tab",
31
+ description: "Moves through the native password field and surrounding form controls with browser defaults."
32
+ }],
33
+ accessibility: [
34
+ "Uses an authored password input with a visible label and helper text.",
35
+ "Connects visible feedback to the input through aria-describedby.",
36
+ "Renders a native progress element with aria-valuetext.",
37
+ "Uses a polite live region that announces only meaningful strength label changes.",
38
+ "Provides visible requirement status text so color is not the only cue.",
39
+ "Keeps password values out of lifecycle event detail."
40
+ ],
41
+ limitations: [
42
+ "Provides local UI guidance only; it is not backend password validation.",
43
+ "Does not store, log, send, or persist password values.",
44
+ "Does not check breached-password databases or external APIs.",
45
+ "Requires authored semantic password-field markup for the best fallback experience."
46
+ ],
47
+ api: [
48
+ {
49
+ name: "A11yPasswordStrengthMeter",
50
+ type: "new (root: HTMLElement, options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance",
51
+ description: "Plugin class for one data-root password strength meter."
52
+ },
53
+ {
54
+ name: "createPasswordStrengthMeter(root, options)",
55
+ type: "(root: HTMLElement, options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance",
56
+ description: "Configures and initializes one data-root password strength meter."
57
+ },
58
+ {
59
+ name: "initPasswordStrengthMeters(options)",
60
+ type: "(options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance[]",
61
+ description: "Initializes every [data-a11y-password-strength-meter] root in the current document."
62
+ },
63
+ {
64
+ name: "getPasswordStrength(password, options)",
65
+ type: "(password: string, options?: PasswordStrengthOptions) => PasswordStrengthResult",
66
+ description: "Returns a local, explainable strength score without logging, storing, or sending the password."
67
+ },
68
+ {
69
+ name: "PASSWORD_STRENGTH_METER_EVENTS",
70
+ type: "{ init: string; change: string; destroy: string }",
71
+ description: "Lifecycle event-name constants for init, change, and destroy events."
72
+ },
73
+ {
74
+ name: "destroy()",
75
+ type: "() => void",
76
+ description: "Removes input listeners, cleans plugin-added descriptions, clears initialized state, and dispatches a destroy event."
77
+ }
78
+ ],
79
+ events: [
80
+ {
81
+ name: "a11y-password-strength-meter:init",
82
+ detail: "{ instance }",
83
+ description: "Bubbles after the plugin initializes. The password value is never included."
84
+ },
85
+ {
86
+ name: "a11y-password-strength-meter:change",
87
+ detail: "{ instance, label, metCount, result }",
88
+ description: "Bubbles after an update dispatches a change event. The password value is never included."
89
+ },
90
+ {
91
+ name: "a11y-password-strength-meter:destroy",
92
+ detail: "{ instance }",
93
+ description: "Bubbles when destroy() removes listeners and plugin-managed state."
94
+ }
95
+ ],
96
+ styles: {
97
+ import: "a11y-password-strength-meter/styles.css",
98
+ block: ".a11y-password-strength-meter",
99
+ customProperties: [
100
+ "--a11y-password-strength-meter-radius",
101
+ "--a11y-password-strength-meter-gap",
102
+ "--a11y-password-strength-meter-muted",
103
+ "--a11y-password-strength-meter-neutral",
104
+ "--a11y-password-strength-meter-danger",
105
+ "--a11y-password-strength-meter-warning",
106
+ "--a11y-password-strength-meter-fair",
107
+ "--a11y-password-strength-meter-good",
108
+ "--a11y-password-strength-meter-strong",
109
+ "--a11y-password-strength-meter-progress-track"
110
+ ]
111
+ },
112
+ examples: [{
113
+ name: "Root Vite demos",
114
+ description: "Static Vite demos for the default, localized labels, and icon-status variants.",
115
+ path: "."
116
+ }, {
117
+ name: "Registration form with validation",
118
+ description: "Semantic signup example combining A11y Form Validator errors with local password-strength feedback.",
119
+ path: "register-form.html"
120
+ }]
121
+ };
122
+ //#endregion
123
+ export { docs };
124
+
125
+ //# sourceMappingURL=docs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.js","names":[],"sources":["../src/docs.ts"],"sourcesContent":["export interface PluginDocs {\n slug: string;\n name: string;\n packageName: string;\n description: string;\n repo?: string;\n npm?: string;\n demo?: string;\n install: {\n npm: string;\n pnpm: string;\n yarn: string;\n };\n usage: string;\n selectors?: string[];\n keyboard?: Array<{\n key: string;\n description: string;\n }>;\n accessibility?: string[];\n limitations?: string[];\n api: Array<{\n name: string;\n type: string;\n description: string;\n }>;\n events?: Array<{\n name: string;\n detail: string;\n description: string;\n }>;\n styles?: {\n import: string;\n block: string;\n customProperties: string[];\n };\n examples?: Array<{\n name: string;\n description: string;\n path: string;\n }>;\n}\n\nexport const docs = {\n slug: \"a11y-password-strength-meter\",\n name: \"A11y Password Strength Meter\",\n packageName: \"a11y-password-strength-meter\",\n description:\n \"Accessible password strength feedback for semantic password fields, built as a vanilla TypeScript plugin.\",\n repo: \"https://github.com/vmitsaras/a11y-password-strength-meter\",\n npm: \"https://www.npmjs.com/package/a11y-password-strength-meter\",\n demo: \"https://vmitsaras.github.io/a11y-password-strength-meter/\",\n install: {\n npm: \"npm install a11y-password-strength-meter\",\n pnpm: \"pnpm add a11y-password-strength-meter\",\n yarn: \"yarn add a11y-password-strength-meter\"\n },\n usage: `import { initPasswordStrengthMeters } from \"a11y-password-strength-meter\";\nimport \"a11y-password-strength-meter/styles.css\";\n\ninitPasswordStrengthMeters();`,\n selectors: [\n \"[data-a11y-password-strength-meter]\",\n \"[data-input-id]\",\n \"[data-feedback-id]\",\n \"[data-requirement]\",\n \"[data-requirement-status-text]\",\n \".a11y-password-strength-meter__requirements\",\n \".a11y-password-strength-meter__requirement-status\",\n \".a11y-password-strength-meter__requirement-text\"\n ],\n keyboard: [\n {\n key: \"Tab\",\n description:\n \"Moves through the native password field and surrounding form controls with browser defaults.\"\n }\n ],\n accessibility: [\n \"Uses an authored password input with a visible label and helper text.\",\n \"Connects visible feedback to the input through aria-describedby.\",\n \"Renders a native progress element with aria-valuetext.\",\n \"Uses a polite live region that announces only meaningful strength label changes.\",\n \"Provides visible requirement status text so color is not the only cue.\",\n \"Keeps password values out of lifecycle event detail.\"\n ],\n limitations: [\n \"Provides local UI guidance only; it is not backend password validation.\",\n \"Does not store, log, send, or persist password values.\",\n \"Does not check breached-password databases or external APIs.\",\n \"Requires authored semantic password-field markup for the best fallback experience.\"\n ],\n api: [\n {\n name: \"A11yPasswordStrengthMeter\",\n type: \"new (root: HTMLElement, options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance\",\n description:\n \"Plugin class for one data-root password strength meter.\"\n },\n {\n name: \"createPasswordStrengthMeter(root, options)\",\n type: \"(root: HTMLElement, options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance\",\n description:\n \"Configures and initializes one data-root password strength meter.\"\n },\n {\n name: \"initPasswordStrengthMeters(options)\",\n type: \"(options?: PasswordStrengthMeterOptions) => PasswordStrengthMeterInstance[]\",\n description:\n \"Initializes every [data-a11y-password-strength-meter] root in the current document.\"\n },\n {\n name: \"getPasswordStrength(password, options)\",\n type: \"(password: string, options?: PasswordStrengthOptions) => PasswordStrengthResult\",\n description:\n \"Returns a local, explainable strength score without logging, storing, or sending the password.\"\n },\n {\n name: \"PASSWORD_STRENGTH_METER_EVENTS\",\n type: \"{ init: string; change: string; destroy: string }\",\n description:\n \"Lifecycle event-name constants for init, change, and destroy events.\"\n },\n {\n name: \"destroy()\",\n type: \"() => void\",\n description:\n \"Removes input listeners, cleans plugin-added descriptions, clears initialized state, and dispatches a destroy event.\"\n }\n ],\n events: [\n {\n name: \"a11y-password-strength-meter:init\",\n detail: \"{ instance }\",\n description:\n \"Bubbles after the plugin initializes. The password value is never included.\"\n },\n {\n name: \"a11y-password-strength-meter:change\",\n detail: \"{ instance, label, metCount, result }\",\n description:\n \"Bubbles after an update dispatches a change event. The password value is never included.\"\n },\n {\n name: \"a11y-password-strength-meter:destroy\",\n detail: \"{ instance }\",\n description:\n \"Bubbles when destroy() removes listeners and plugin-managed state.\"\n }\n ],\n styles: {\n import: \"a11y-password-strength-meter/styles.css\",\n block: \".a11y-password-strength-meter\",\n customProperties: [\n \"--a11y-password-strength-meter-radius\",\n \"--a11y-password-strength-meter-gap\",\n \"--a11y-password-strength-meter-muted\",\n \"--a11y-password-strength-meter-neutral\",\n \"--a11y-password-strength-meter-danger\",\n \"--a11y-password-strength-meter-warning\",\n \"--a11y-password-strength-meter-fair\",\n \"--a11y-password-strength-meter-good\",\n \"--a11y-password-strength-meter-strong\",\n \"--a11y-password-strength-meter-progress-track\"\n ]\n },\n examples: [\n {\n name: \"Root Vite demos\",\n description:\n \"Static Vite demos for the default, localized labels, and icon-status variants.\",\n path: \".\"\n },\n {\n name: \"Registration form with validation\",\n description:\n \"Semantic signup example combining A11y Form Validator errors with local password-strength feedback.\",\n path: \"register-form.html\"\n }\n ]\n} satisfies PluginDocs;\n"],"mappings":";AA2CA,MAAa,OAAO;CAClB,MAAM;CACN,MAAM;CACN,aAAa;CACb,aACE;CACF,MAAM;CACN,KAAK;CACL,MAAM;CACN,SAAS;EACP,KAAK;EACL,MAAM;EACN,MAAM;CACR;CACA,OAAO;;;;CAIP,WAAW;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,UAAU,CACR;EACE,KAAK;EACL,aACE;CACJ,CACF;CACA,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;CACF;CACA,aAAa;EACX;EACA;EACA;EACA;CACF;CACA,KAAK;EACH;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;EACA;GACE,MAAM;GACN,MAAM;GACN,aACE;EACJ;CACF;CACA,QAAQ;EACN;GACE,MAAM;GACN,QAAQ;GACR,aACE;EACJ;EACA;GACE,MAAM;GACN,QAAQ;GACR,aACE;EACJ;EACA;GACE,MAAM;GACN,QAAQ;GACR,aACE;EACJ;CACF;CACA,QAAQ;EACN,QAAQ;EACR,OAAO;EACP,kBAAkB;GAChB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;CACF;CACA,UAAU,CACR;EACE,MAAM;EACN,aACE;EACF,MAAM;CACR,GACA;EACE,MAAM;EACN,aACE;EACF,MAAM;CACR,CACF;AACF"}