feat: configurable default language and WAI-ARIA accessible name
Release Accessibility Widget / release (push) Waiting to run

widget.js:
- add defaultLanguage config (honored on first visit over browser detect)
- compute screen reader text via ARIA order: aria-labelledby -> aria-label
  -> contents -> alt -> title
- extract getSpeechLang() helper (was duplicated in handleFocus + toggle)
- use optional chaining for ACCESSIBILITY_WIDGET_CONFIG lookup

package.json (fork metadata):
- license: GPL -> GPL-3.0-or-later (valid SPDX)
- engines: node >=12 -> >=14 (optional chaining)
- add homepage, drop empty dep objects and non-standard cdn field
This commit is contained in:
2026-07-01 08:33:50 +08:00
parent f0bc0307c1
commit 6f1f8cdced
2 changed files with 80 additions and 75 deletions
+10 -14
View File
@@ -1,5 +1,5 @@
{
"name": "accessibility-widgets",
{
"name": "@invisi/accessibility-widgets",
"version": "2.0.14",
"description": "A comprehensive, lightweight accessibility widget that enhances web accessibility for all users. Provides multiple accessibility features including screen reader support, voice control, high contrast mode, and more.",
"main": "widget.js",
@@ -32,26 +32,25 @@
"assistive-technology"
],
"author": {
"name": "sinanisler",
"email": "sinan@sinan.im",
"url": "https://sinan.im"
"name": "Surya Handika Putratama",
"email": "ubunteroz@gmail.com"
},
"license": "GPL",
"license": "GPL-3.0-or-later",
"repository": {
"type": "git",
"url": "git+https://github.com/sinanisler/accessibility-widgets.git"
"url": "git+https://git.invisi.co.id/invisi/accessibility-widgets"
},
"bugs": {
"url": "https://github.com/sinanisler/accessibility-widgets/issues"
"url": "https://git.invisi.co.id/invisi/accessibility-widgets/issues"
},
"homepage": "https://sinan.im",
"homepage": "https://git.invisi.co.id/invisi/accessibility-widgets",
"files": [
"widget.js",
"README.md",
"LICENSE"
],
"engines": {
"node": ">=12.0.0"
"node": ">=14.0.0"
},
"browserslist": [
"> 1%",
@@ -59,9 +58,6 @@
"not dead",
"not ie 11"
],
"devDependencies": {},
"dependencies": {},
"peerDependencies": {},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/sinanisler"
@@ -69,4 +65,4 @@
"jsdelivr": "widget.js",
"unpkg": "widget.js",
"cdn": "widget.js"
}
}