Skip to content

Commit 742b25c

Browse files
committed
package 02.07.25
1 parent bf883af commit 742b25c

File tree

8 files changed

+68
-7
lines changed

8 files changed

+68
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [1.43.1](https://github.com/ajaxorg/ace/compare/v1.43.0...v1.43.1) (2025-07-02)
6+
7+
8+
### Bug Fixes
9+
10+
* **a11y:** aria-describedby to gutter elements ([#5838](https://github.com/ajaxorg/ace/issues/5838)) ([bf27c15](https://github.com/ajaxorg/ace/commit/bf27c151685ac486a991a61d67fa04adf8891c76))
11+
512
### [1.42.1](https://github.com/ajaxorg/ace/compare/v1.42.0...v1.42.1) (2025-06-20)
613

714

ace.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ declare module "ace-builds" {
10631063
import { Range } from "ace-builds-internal/range";
10641064
import { UndoManager } from "ace-builds-internal/undomanager";
10651065
import { VirtualRenderer as Renderer } from "ace-builds-internal/virtual_renderer";
1066-
export var version: "1.43.0";
1066+
export var version: "1.43.1";
10671067
export { Range, Editor, EditSession, UndoManager, Renderer as VirtualRenderer };
10681068
}
10691069

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ace-builds",
33
"main": "./src-noconflict/ace.js",
44
"typings": "ace.d.ts",
5-
"version": "1.43.0",
5+
"version": "1.43.1",
66
"description": "Ace (Ajax.org Cloud9 Editor)",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1"

src-min-noconflict/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-min/ace.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-noconflict/ace.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ var reportErrorIfPathIsNotConfigured = function () {
13201320
reportErrorIfPathIsNotConfigured = function () { };
13211321
}
13221322
};
1323-
exports.version = "1.43.0";
1323+
exports.version = "1.43.1";
13241324

13251325
});
13261326

@@ -3521,10 +3521,12 @@ var GutterTooltip = /** @class */ (function (_super) {
35213521
function GutterTooltip(editor, isHover) {
35223522
if (isHover === void 0) { isHover = false; }
35233523
var _this = _super.call(this, editor.container) || this;
3524+
_this.id = "gt" + (++GutterTooltip.$uid);
35243525
_this.editor = editor;
35253526
_this.visibleTooltipRow;
35263527
var el = _this.getElement();
35273528
el.setAttribute("role", "tooltip");
3529+
el.setAttribute("id", _this.id);
35283530
el.style.pointerEvents = "auto";
35293531
if (isHover) {
35303532
_this.onMouseOut = _this.onMouseOut.bind(_this);
@@ -3647,16 +3649,38 @@ var GutterTooltip = /** @class */ (function (_super) {
36473649
this.setTheme(this.editor.renderer.theme);
36483650
this.setClassName("ace_gutter-tooltip");
36493651
}
3652+
var annotationNode = this.$findLinkedAnnotationNode(row);
3653+
if (annotationNode) {
3654+
annotationNode.setAttribute("aria-describedby", this.id);
3655+
}
36503656
this.show();
36513657
this.visibleTooltipRow = row;
36523658
this.editor._signal("showGutterTooltip", this);
36533659
};
3660+
GutterTooltip.prototype.$findLinkedAnnotationNode = function (row) {
3661+
var cell = this.$findCellByRow(row);
3662+
if (cell) {
3663+
var element = cell.element;
3664+
if (element.childNodes.length > 2) {
3665+
return element.childNodes[2];
3666+
}
3667+
}
3668+
};
3669+
GutterTooltip.prototype.$findCellByRow = function (row) {
3670+
return this.editor.renderer.$gutterLayer.$lines.cells.find(function (el) { return el.row === row; });
3671+
};
36543672
GutterTooltip.prototype.hideTooltip = function () {
36553673
if (!this.isOpen) {
36563674
return;
36573675
}
36583676
this.$element.removeAttribute("aria-live");
36593677
this.hide();
3678+
if (this.visibleTooltipRow != undefined) {
3679+
var annotationNode = this.$findLinkedAnnotationNode(this.visibleTooltipRow);
3680+
if (annotationNode) {
3681+
annotationNode.removeAttribute("aria-describedby");
3682+
}
3683+
}
36603684
this.visibleTooltipRow = undefined;
36613685
this.editor._signal("hideGutterTooltip", this);
36623686
};
@@ -3684,6 +3708,7 @@ var GutterTooltip = /** @class */ (function (_super) {
36843708
};
36853709
return GutterTooltip;
36863710
}(Tooltip));
3711+
GutterTooltip.$uid = 0;
36873712
exports.GutterTooltip = GutterTooltip;
36883713

36893714
});

src/ace.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1320,7 +1320,7 @@ var reportErrorIfPathIsNotConfigured = function () {
13201320
reportErrorIfPathIsNotConfigured = function () { };
13211321
}
13221322
};
1323-
exports.version = "1.43.0";
1323+
exports.version = "1.43.1";
13241324

13251325
});
13261326

@@ -3521,10 +3521,12 @@ var GutterTooltip = /** @class */ (function (_super) {
35213521
function GutterTooltip(editor, isHover) {
35223522
if (isHover === void 0) { isHover = false; }
35233523
var _this = _super.call(this, editor.container) || this;
3524+
_this.id = "gt" + (++GutterTooltip.$uid);
35243525
_this.editor = editor;
35253526
_this.visibleTooltipRow;
35263527
var el = _this.getElement();
35273528
el.setAttribute("role", "tooltip");
3529+
el.setAttribute("id", _this.id);
35283530
el.style.pointerEvents = "auto";
35293531
if (isHover) {
35303532
_this.onMouseOut = _this.onMouseOut.bind(_this);
@@ -3647,16 +3649,38 @@ var GutterTooltip = /** @class */ (function (_super) {
36473649
this.setTheme(this.editor.renderer.theme);
36483650
this.setClassName("ace_gutter-tooltip");
36493651
}
3652+
var annotationNode = this.$findLinkedAnnotationNode(row);
3653+
if (annotationNode) {
3654+
annotationNode.setAttribute("aria-describedby", this.id);
3655+
}
36503656
this.show();
36513657
this.visibleTooltipRow = row;
36523658
this.editor._signal("showGutterTooltip", this);
36533659
};
3660+
GutterTooltip.prototype.$findLinkedAnnotationNode = function (row) {
3661+
var cell = this.$findCellByRow(row);
3662+
if (cell) {
3663+
var element = cell.element;
3664+
if (element.childNodes.length > 2) {
3665+
return element.childNodes[2];
3666+
}
3667+
}
3668+
};
3669+
GutterTooltip.prototype.$findCellByRow = function (row) {
3670+
return this.editor.renderer.$gutterLayer.$lines.cells.find(function (el) { return el.row === row; });
3671+
};
36543672
GutterTooltip.prototype.hideTooltip = function () {
36553673
if (!this.isOpen) {
36563674
return;
36573675
}
36583676
this.$element.removeAttribute("aria-live");
36593677
this.hide();
3678+
if (this.visibleTooltipRow != undefined) {
3679+
var annotationNode = this.$findLinkedAnnotationNode(this.visibleTooltipRow);
3680+
if (annotationNode) {
3681+
annotationNode.removeAttribute("aria-describedby");
3682+
}
3683+
}
36603684
this.visibleTooltipRow = undefined;
36613685
this.editor._signal("hideGutterTooltip", this);
36623686
};
@@ -3684,6 +3708,7 @@ var GutterTooltip = /** @class */ (function (_super) {
36843708
};
36853709
return GutterTooltip;
36863710
}(Tooltip));
3711+
GutterTooltip.$uid = 0;
36873712
exports.GutterTooltip = GutterTooltip;
36883713

36893714
});

types/ace-modules.d.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ declare module "ace-builds-internal/config" {
375375
string
376376
], onLoad: (module: any) => void) => void;
377377
setModuleLoader: (moduleName: any, onLoad: any) => void;
378-
version: "1.43.0";
378+
version: "1.43.1";
379379
};
380380
export = _exports;
381381
}
@@ -1788,13 +1788,17 @@ declare module "ace-builds-internal/mouse/default_gutter_handler" {
17881788
};
17891789
static annotationsToSummaryString(annotations: any): string;
17901790
constructor(editor: any, isHover?: boolean);
1791+
id: string;
17911792
editor: any;
17921793
visibleTooltipRow: number | undefined;
17931794
onMouseOut(e: any): void;
17941795
setPosition(x: any, y: any): void;
17951796
showTooltip(row: any): void;
17961797
hideTooltip(): void;
17971798
}
1799+
export namespace GutterTooltip {
1800+
let $uid: number;
1801+
}
17981802
import { Tooltip } from "ace-builds-internal/tooltip";
17991803
export interface GutterHandler {
18001804
}

0 commit comments

Comments
 (0)