Skip to content

Commit a6ec543

Browse files
improve: add aria-describedy attribute to tooltip dialog, map it to tooltip content
1 parent d6b7bc9 commit a6ec543

File tree

5 files changed

+78
-73
lines changed

5 files changed

+78
-73
lines changed

changelog.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Release History
22

3+
* **v2.9.6** - 2020-11-03
4+
- add `aria-describedby` attribute to the intro.js step tooltip dialog
5+
36
* **v2.9.3** - 2018-04-24
47
- hotfix to skipping and exiting the intro
58

@@ -11,7 +14,7 @@
1114

1215
* **v2.9.0** - 2018-04-23
1316
- Added @bozdoz as Author
14-
- Fixed scroll positions when parent element is scrollable
17+
- Fixed scroll positions when parent element is scrollable
1518
- Added DOM Event helper function and _stamp to uniquely identify objects and intro instances; fixes issues with removing event listeners
1619
- Added new syntax for radial gradients
1720
- Fixes to CSP violations to avoid using `setAttribute`
@@ -39,7 +42,7 @@
3942

4043
* **v2.6.0** - 2017-07-29
4144
- Per step disable interaction
42-
- Adding `scrollTo` option
45+
- Adding `scrollTo` option
4346
- Better scrolling method
4447
- Fixing pulse animation issue on IE
4548
- Adding a new method to show the popup of specific hint

intro.js

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

628628
tooltipLayer.className = ('introjs-tooltip ' + tooltipCssClass).replace(/^\s+|\s+$/g, '');
629629
tooltipLayer.setAttribute('role', 'dialog');
630+
tooltipLayer.setAttribute('aria-describedby', 'introjs-tooltiptext-id');
630631

631632
currentTooltipPosition = this._introItems[this._currentStep].position;
632633

@@ -1153,6 +1154,7 @@
11531154
arrowLayer.className = 'introjs-arrow';
11541155

11551156
tooltipTextLayer.className = 'introjs-tooltiptext';
1157+
tooltipTextLayer.id = 'introjs-tooltiptext-id';
11561158
tooltipTextLayer.innerHTML = targetElement.intro;
11571159

11581160
bulletsLayer.className = 'introjs-bullets';

minified/intro.min.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.

package-lock.json

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "intro.js",
33
"description": "Better introductions for websites and features with a step-by-step guide for your projects",
4-
"version": "2.9.5",
4+
"version": "2.9.6",
55
"author": "Afshin Mehrabani <[email protected]>",
66
"homepage": "http://introjs.com",
77
"repository": {

0 commit comments

Comments
 (0)