@lion/ui 0.8.7 → 0.8.8
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/components/pagination/src/LionPagination.js +1 -0
- package/components/pagination/test/lion-pagination.test.js +16 -0
- package/dist-types/components/pagination/src/LionPagination.d.ts.map +1 -1
- package/dist-types/tsconfig.tsbuildinfo +1 -1
- package/docs/components/checkbox-group/overview.md +2 -2
- package/docs/components/collapsible/overview.md +1 -1
- package/docs/components/combobox/overview.md +1 -1
- package/docs/components/combobox/use-cases.md +1 -1
- package/docs/components/dialog/overview.md +1 -1
- package/docs/components/fieldset/overview.md +5 -5
- package/docs/components/form/overview.md +3 -3
- package/docs/components/form/use-cases.md +2 -2
- package/docs/components/icon/use-cases.md +1 -1
- package/docs/components/input/overview.md +1 -1
- package/docs/components/input-amount/overview.md +3 -3
- package/docs/components/input-date/overview.md +3 -3
- package/docs/components/input-datepicker/overview.md +5 -5
- package/docs/components/input-email/overview.md +2 -2
- package/docs/components/input-file/overview.md +1 -1
- package/docs/components/input-iban/overview.md +2 -2
- package/docs/components/input-range/overview.md +2 -2
- package/docs/components/input-stepper/overview.md +1 -1
- package/docs/components/input-tel/overview.md +1 -1
- package/docs/components/input-tel/use-cases.md +6 -6
- package/docs/components/input-tel-dropdown/overview.md +1 -1
- package/docs/components/listbox/use-cases.md +1 -1
- package/docs/components/radio-group/overview.md +3 -3
- package/docs/components/select/use-cases.md +1 -1
- package/docs/components/select-rich/use-cases.md +1 -1
- package/docs/components/tabs/examples.md +1 -1
- package/docs/fundamentals/index.md +4 -4
- package/docs/fundamentals/node-tools/publish-docs/overview.md +3 -3
- package/docs/fundamentals/node-tools/rocket-preset-extend-lion-docs/overview.md +2 -2
- package/docs/fundamentals/rationales/accessibility.md +1 -1
- package/docs/fundamentals/systems/core/SlotMixin.md +1 -1
- package/docs/fundamentals/systems/core/overview.md +1 -1
- package/docs/fundamentals/systems/form/formatting-and-parsing.md +4 -4
- package/docs/fundamentals/systems/form/model-value.md +1 -1
- package/docs/fundamentals/systems/form/overview.md +28 -28
- package/docs/fundamentals/systems/form/validate.md +2 -2
- package/docs/fundamentals/systems/localize/overview.md +4 -4
- package/docs/fundamentals/systems/overlays/configuration.md +2 -2
- package/docs/fundamentals/systems/overlays/overview.md +5 -5
- package/docs/fundamentals/systems/overlays/use-cases.md +2 -2
- package/docs/fundamentals/tools/helpers/overview.md +1 -1
- package/docs/fundamentals/tools/singleton-manager/overview.md +4 -4
- package/docs/guides/how-to/create-a-custom-field.md +5 -5
- package/docs/guides/how-to/create-a-form.md +4 -4
- package/docs/guides/how-to/extend-a-native-input.md +2 -2
- package/docs/guides/index.md +8 -8
- package/docs/guides/principles/index.md +5 -5
- package/docs/guides/principles/styling.md +1 -1
- package/package.json +1 -1
|
@@ -287,6 +287,7 @@ export class LionPagination extends LocalizeMixin(LitElement) {
|
|
|
287
287
|
<button
|
|
288
288
|
aria-label="${this.msgLit('lion-pagination:page', { page })}"
|
|
289
289
|
aria-current=${page === this.current}
|
|
290
|
+
aria-live="${page === this.current ? 'polite' : 'off'}"
|
|
290
291
|
@click=${() => this.__fire(page)}
|
|
291
292
|
>
|
|
292
293
|
${page}
|
|
@@ -105,6 +105,22 @@ describe('Pagination', () => {
|
|
|
105
105
|
expect(el.current).to.equal(2);
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
+
it('should announce next and previous page using `next()` and `previous()`', async () => {
|
|
109
|
+
const el = await fixture(html` <lion-pagination count="6" current="2"></lion-pagination> `);
|
|
110
|
+
const buttons = Array.from(
|
|
111
|
+
/** @type {ShadowRoot} */ (el.shadowRoot).querySelectorAll('button'),
|
|
112
|
+
);
|
|
113
|
+
expect(buttons[2].getAttribute('aria-live')).to.equal('polite');
|
|
114
|
+
el.next();
|
|
115
|
+
await el.updateComplete;
|
|
116
|
+
expect(buttons[3].getAttribute('aria-live')).to.equal('polite');
|
|
117
|
+
expect(buttons[2].getAttribute('aria-live')).to.equal('off');
|
|
118
|
+
el.previous();
|
|
119
|
+
await el.updateComplete;
|
|
120
|
+
expect(buttons[3].getAttribute('aria-live')).to.equal('off');
|
|
121
|
+
expect(buttons[2].getAttribute('aria-live')).to.equal('polite');
|
|
122
|
+
});
|
|
123
|
+
|
|
108
124
|
it('should goto next and previous page using `next()` and `previous()`', async () => {
|
|
109
125
|
const el = await fixture(html` <lion-pagination count="6" current="2"></lion-pagination> `);
|
|
110
126
|
el.next();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LionPagination.d.ts","sourceRoot":"","sources":["../../../../components/pagination/src/LionPagination.js"],"names":[],"mappings":";AAIA;;GAEG;AAEH;;;;GAIG;AACH;IACE,+CAsBC;IAoDD;;;;;;;;;MAWC;IAED,4BAA4B;IAC5B,yBAOC;IAED,wBAAwB;IACxB,sBAEC;IATG,8BAAsB;IAaxB,eAAe;IACf,uBAAuB;IAEvB,cAAc;IAGhB;;;OAGG;IACH,oBAIC;IAED;;;OAGG;IACH,qBAIC;IAED;;;OAGG;IACH,oBAIC;IAED;;;;OAIG;IACH,wBAHW,MAAM,QAOhB;IAED;;;OAGG;IACH,wBAIC;IAED;;;;OAIG;IACH,eAIC;IAED;;;;OAIG;IACH,2BAiCC;IAED;;;;;;OAMG;IAEH,gDAJa,cAAc,CAM1B;IAED;;;;;;;;OAQG;IACH,0FAHa,cAAc,CAc1B;IAED;;;;;;OAMG;IACH,kDAHa,cAAc,CAS1B;IAED;;;;OAIG;IACH,4BAHa,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"LionPagination.d.ts","sourceRoot":"","sources":["../../../../components/pagination/src/LionPagination.js"],"names":[],"mappings":";AAIA;;GAEG;AAEH;;;;GAIG;AACH;IACE,+CAsBC;IAoDD;;;;;;;;;MAWC;IAED,4BAA4B;IAC5B,yBAOC;IAED,wBAAwB;IACxB,sBAEC;IATG,8BAAsB;IAaxB,eAAe;IACf,uBAAuB;IAEvB,cAAc;IAGhB;;;OAGG;IACH,oBAIC;IAED;;;OAGG;IACH,qBAIC;IAED;;;OAGG;IACH,oBAIC;IAED;;;;OAIG;IACH,wBAHW,MAAM,QAOhB;IAED;;;OAGG;IACH,wBAIC;IAED;;;;OAIG;IACH,eAIC;IAED;;;;OAIG;IACH,2BAiCC;IAED;;;;;;OAMG;IAEH,gDAJa,cAAc,CAM1B;IAED;;;;;;;;OAQG;IACH,0FAHa,cAAc,CAc1B;IAED;;;;;;OAMG;IACH,kDAHa,cAAc,CAS1B;IAED;;;;OAIG;IACH,4BAHa,cAAc,EAAE,CAoB5B;IAED,+CAcC;CACF;6BArTY,OAAO,KAAK,EAAE,cAAc"}
|