@skyux/a11y 5.0.0-beta.2 → 5.5.0-alpha.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/README.md +6 -4
- package/bundles/skyux-a11y.umd.js +41 -57
- package/documentation.json +77 -250
- package/esm2015/index.js +5 -0
- package/esm2015/index.js.map +1 -0
- package/esm2015/lib/modules/shared/a11y-resources.module.js +45 -0
- package/esm2015/lib/modules/shared/a11y-resources.module.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js +25 -0
- package/esm2015/lib/modules/skip-link/skip-link-adapter.service.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-args.js +3 -0
- package/esm2015/lib/modules/skip-link/skip-link-args.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js +35 -0
- package/esm2015/lib/modules/skip-link/skip-link-host.component.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.js +2 -0
- package/esm2015/lib/modules/skip-link/skip-link.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.module.js +23 -0
- package/esm2015/lib/modules/skip-link/skip-link.module.js.map +1 -0
- package/esm2015/lib/modules/skip-link/skip-link.service.js +51 -0
- package/esm2015/lib/modules/skip-link/skip-link.service.js.map +1 -0
- package/esm2015/skyux-a11y.js +2 -2
- package/esm2015/skyux-a11y.js.map +1 -0
- package/fesm2015/skyux-a11y.js +35 -49
- package/fesm2015/skyux-a11y.js.map +1 -1
- package/index.d.ts +4 -0
- package/{modules → lib/modules}/shared/a11y-resources.module.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-adapter.service.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-args.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link-host.component.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.module.d.ts +0 -0
- package/{modules → lib/modules}/skip-link/skip-link.service.d.ts +0 -0
- package/package.json +6 -6
- package/skyux-a11y.d.ts +1 -1
- package/LICENSE +0 -21
- package/bundles/skyux-a11y.umd.js.map +0 -1
- package/esm2015/modules/shared/a11y-resources.module.js +0 -41
- package/esm2015/modules/skip-link/skip-link-adapter.service.js +0 -24
- package/esm2015/modules/skip-link/skip-link-args.js +0 -3
- package/esm2015/modules/skip-link/skip-link-host.component.js +0 -39
- package/esm2015/modules/skip-link/skip-link.js +0 -2
- package/esm2015/modules/skip-link/skip-link.module.js +0 -37
- package/esm2015/modules/skip-link/skip-link.service.js +0 -51
- package/esm2015/public-api.js +0 -5
- package/public-api.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
#
|
|
1
|
+
# a11y
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test a11y` to execute the unit tests.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@skyux/i18n'), require('@skyux/core')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define('@skyux/a11y', ['exports', '@angular/core', '@angular/common', '@skyux/i18n', '@skyux/core'], factory) :
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.skyux = global.skyux || {}, global.skyux.a11y = {}), global.ng.core, global.ng.common, global.i3, global.i1));
|
|
5
|
-
}(this, (function (exports, i0, i2, i3, i1) { 'use strict';
|
|
5
|
+
})(this, (function (exports, i0, i2, i3, i1) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -13,14 +13,12 @@
|
|
|
13
13
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
14
|
Object.defineProperty(n, k, d.get ? d : {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
16
|
+
get: function () { return e[k]; }
|
|
19
17
|
});
|
|
20
18
|
}
|
|
21
19
|
});
|
|
22
20
|
}
|
|
23
|
-
n[
|
|
21
|
+
n["default"] = e;
|
|
24
22
|
return Object.freeze(n);
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -36,7 +34,7 @@
|
|
|
36
34
|
* To update this file, simply rerun the command.
|
|
37
35
|
*/
|
|
38
36
|
var RESOURCES = {
|
|
39
|
-
'EN-US': {
|
|
37
|
+
'EN-US': { skyux_list_skip_to_link: { message: 'Skip to {0}' } },
|
|
40
38
|
};
|
|
41
39
|
var SkyA11yResourcesProvider = /** @class */ (function () {
|
|
42
40
|
function SkyA11yResourcesProvider() {
|
|
@@ -54,22 +52,26 @@
|
|
|
54
52
|
}
|
|
55
53
|
return SkyA11yResourcesModule;
|
|
56
54
|
}());
|
|
57
|
-
SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
58
|
-
SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
59
|
-
SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.
|
|
55
|
+
SkyA11yResourcesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
56
|
+
SkyA11yResourcesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, exports: [i3.SkyI18nModule] });
|
|
57
|
+
SkyA11yResourcesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, providers: [
|
|
58
|
+
{
|
|
60
59
|
provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
|
|
61
60
|
useClass: SkyA11yResourcesProvider,
|
|
62
|
-
multi: true
|
|
63
|
-
}
|
|
64
|
-
|
|
61
|
+
multi: true,
|
|
62
|
+
},
|
|
63
|
+
], imports: [i3.SkyI18nModule] });
|
|
64
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyA11yResourcesModule, decorators: [{
|
|
65
65
|
type: i0.NgModule,
|
|
66
66
|
args: [{
|
|
67
67
|
exports: [i3.SkyI18nModule],
|
|
68
|
-
providers: [
|
|
68
|
+
providers: [
|
|
69
|
+
{
|
|
69
70
|
provide: i3.SKY_LIB_RESOURCES_PROVIDERS,
|
|
70
71
|
useClass: SkyA11yResourcesProvider,
|
|
71
|
-
multi: true
|
|
72
|
-
}
|
|
72
|
+
multi: true,
|
|
73
|
+
},
|
|
74
|
+
],
|
|
73
75
|
}]
|
|
74
76
|
}] });
|
|
75
77
|
|
|
@@ -89,9 +91,9 @@
|
|
|
89
91
|
};
|
|
90
92
|
return SkySkipLinkAdapterService;
|
|
91
93
|
}());
|
|
92
|
-
SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
93
|
-
SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
94
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
94
|
+
SkySkipLinkAdapterService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, deps: [{ token: i1__namespace.SkyAppWindowRef }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
95
|
+
SkySkipLinkAdapterService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService });
|
|
96
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkAdapterService, decorators: [{
|
|
95
97
|
type: i0.Injectable
|
|
96
98
|
}], ctorParameters: function () { return [{ type: i1__namespace.SkyAppWindowRef }]; } });
|
|
97
99
|
|
|
@@ -116,20 +118,16 @@
|
|
|
116
118
|
};
|
|
117
119
|
return SkySkipLinkHostComponent;
|
|
118
120
|
}());
|
|
119
|
-
SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
120
|
-
SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.
|
|
121
|
-
|
|
122
|
-
], ngImport: i0__namespace, template: "<button *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources:link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
123
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0__namespace, type: SkySkipLinkHostComponent, decorators: [{
|
|
121
|
+
SkySkipLinkHostComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: SkySkipLinkAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
122
|
+
SkySkipLinkHostComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkySkipLinkHostComponent, selector: "sky-skip-link-host", providers: [SkySkipLinkAdapterService], ngImport: i0__namespace, template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n", styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"], directives: [{ type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "skyLibResources": i3__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
123
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkHostComponent, decorators: [{
|
|
124
124
|
type: i0.Component,
|
|
125
125
|
args: [{
|
|
126
126
|
selector: 'sky-skip-link-host',
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
template: "<button\n *ngFor=\"let link of links\"\n class=\"sky-btn sky-btn-primary sky-skip-link\"\n type=\"button\"\n (click)=\"skipTo(link)\"\n>\n {{ 'skyux_list_skip_to_link' | skyLibResources: link.title }}\n</button>\n",
|
|
128
|
+
styles: [".sky-skip-link{position:absolute;left:-999px;width:1px;height:1px;top:auto}.sky-skip-link:focus,.sky-skip-link:active{display:inline-block;height:auto;width:auto;position:absolute;top:10px;left:10px;margin:auto;z-index:10000}\n"],
|
|
129
129
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
130
|
-
providers: [
|
|
131
|
-
SkySkipLinkAdapterService
|
|
132
|
-
]
|
|
130
|
+
providers: [SkySkipLinkAdapterService],
|
|
133
131
|
}]
|
|
134
132
|
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: SkySkipLinkAdapterService }]; } });
|
|
135
133
|
|
|
@@ -141,29 +139,15 @@
|
|
|
141
139
|
}
|
|
142
140
|
return SkySkipLinkModule;
|
|
143
141
|
}());
|
|
144
|
-
SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
145
|
-
SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0__namespace, type: SkySkipLinkModule, imports: [[
|
|
149
|
-
i2.CommonModule,
|
|
150
|
-
i3.SkyI18nModule,
|
|
151
|
-
SkyA11yResourcesModule
|
|
152
|
-
]] });
|
|
153
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.2", ngImport: i0__namespace, type: SkySkipLinkModule, decorators: [{
|
|
142
|
+
SkySkipLinkModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
143
|
+
SkySkipLinkModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, declarations: [SkySkipLinkHostComponent], imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule] });
|
|
144
|
+
SkySkipLinkModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, imports: [[i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule]] });
|
|
145
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkModule, decorators: [{
|
|
154
146
|
type: i0.NgModule,
|
|
155
147
|
args: [{
|
|
156
|
-
entryComponents: [
|
|
157
|
-
|
|
158
|
-
],
|
|
159
|
-
declarations: [
|
|
160
|
-
SkySkipLinkHostComponent
|
|
161
|
-
],
|
|
162
|
-
imports: [
|
|
163
|
-
i2.CommonModule,
|
|
164
|
-
i3.SkyI18nModule,
|
|
165
|
-
SkyA11yResourcesModule
|
|
166
|
-
]
|
|
148
|
+
entryComponents: [SkySkipLinkHostComponent],
|
|
149
|
+
declarations: [SkySkipLinkHostComponent],
|
|
150
|
+
imports: [i2.CommonModule, i3.SkyI18nModule, SkyA11yResourcesModule],
|
|
167
151
|
}]
|
|
168
152
|
}] });
|
|
169
153
|
|
|
@@ -182,8 +166,8 @@
|
|
|
182
166
|
SkySkipLinkService.prototype.setSkipLinks = function (args) {
|
|
183
167
|
var _this = this;
|
|
184
168
|
args.links = args.links.filter(function (link) {
|
|
185
|
-
var elementRefExists =
|
|
186
|
-
return
|
|
169
|
+
var elementRefExists = link.elementRef;
|
|
170
|
+
return elementRefExists;
|
|
187
171
|
});
|
|
188
172
|
// Timeout needed in case the consumer sets the skip links within an Angular lifecycle hook.
|
|
189
173
|
setTimeout(function () {
|
|
@@ -198,7 +182,7 @@
|
|
|
198
182
|
SkySkipLinkService.prototype.createHostComponent = function () {
|
|
199
183
|
if (!SkySkipLinkService.host) {
|
|
200
184
|
var componentRef = this.dynamicComponentService.createComponent(SkySkipLinkHostComponent, {
|
|
201
|
-
location: i1.SkyDynamicComponentLocation.BodyTop
|
|
185
|
+
location: i1.SkyDynamicComponentLocation.BodyTop,
|
|
202
186
|
});
|
|
203
187
|
SkySkipLinkService.host = componentRef;
|
|
204
188
|
}
|
|
@@ -206,12 +190,12 @@
|
|
|
206
190
|
};
|
|
207
191
|
return SkySkipLinkService;
|
|
208
192
|
}());
|
|
209
|
-
SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.
|
|
210
|
-
SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.
|
|
211
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.
|
|
193
|
+
SkySkipLinkService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, deps: [{ token: i1__namespace.SkyDynamicComponentService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
194
|
+
SkySkipLinkService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, providedIn: 'root' });
|
|
195
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkySkipLinkService, decorators: [{
|
|
212
196
|
type: i0.Injectable,
|
|
213
197
|
args: [{
|
|
214
|
-
providedIn: 'root'
|
|
198
|
+
providedIn: 'root',
|
|
215
199
|
}]
|
|
216
200
|
}], ctorParameters: function () { return [{ type: i1__namespace.SkyDynamicComponentService }]; } });
|
|
217
201
|
|
|
@@ -224,5 +208,5 @@
|
|
|
224
208
|
|
|
225
209
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
226
210
|
|
|
227
|
-
}))
|
|
211
|
+
}));
|
|
228
212
|
//# sourceMappingURL=skyux-a11y.umd.js.map
|