@madgex/design-system 10.0.7 → 10.0.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@madgex/design-system",
3
3
  "author": "Madgex",
4
4
  "license": "UNLICENSED",
5
- "version": "10.0.7",
5
+ "version": "10.0.8",
6
6
  "main": "dist/js/index.js",
7
7
  "exports": {
8
8
  ".": "./dist/js/index.js",
@@ -4,9 +4,9 @@
4
4
  {%- set backToLabel = params.i18n.backToLabel | default('Results') -%}
5
5
  {%- set backToAriaLabel = params.i18n.backToAriaLabel -%}
6
6
  {%- set prevLabel = params.i18n.prevLabel | default('Previous') -%}
7
- {%- set prevAriaLabel = params.i18n.prevAriaLabel | default('Previous page') -%}
7
+ {%- set prevAriaLabel = params.i18n.prevAriaLabel -%}
8
8
  {%- set nextLabel = params.i18n.nextLabel | default('Next') -%}
9
- {%- set nextAriaLabel = params.i18n.nextAriaLabel | default('Next page') -%}
9
+ {%- set nextAriaLabel = params.i18n.nextAriaLabel -%}
10
10
 
11
11
  <nav aria-label="{{ navAriaLabel }}" data-test="pagination{% if params.id %}-{{params.id}}{% endif %}">
12
12
  <ul class="mds-pagination mds-pagination--jobs mds-text-align-right{% if params.classes %} {{params.classes}}{% endif %}">
@@ -27,7 +27,9 @@
27
27
  <li class="mds-pagination__item mds-pagination__previous">
28
28
  <a href="{{ params.prevUrl }}"
29
29
  class="mds-pagination__link mds-pagination__link--background"
30
- aria-label="{{ prevAriaLabel }}{% if params.prevExtraLabel %} - {{ params.prevExtraLabel }}{% endif %}">
30
+ {%- if prevAriaLabel -%}
31
+ aria-label="{{ prevAriaLabel }}{% if params.prevExtraLabel %} - {{ params.prevExtraLabel }}{% endif %}"
32
+ {%- endif -%}>
31
33
  {%- if not params.hideIcons -%}
32
34
  {{ MdsIcon({
33
35
  iconName: 'chevron-left',
@@ -45,7 +47,9 @@
45
47
  <li class="mds-pagination__item mds-pagination__next">
46
48
  <a href="{{ params.nextUrl }}"
47
49
  class="mds-pagination__link mds-pagination__link--background mds-arrow-side-switch"
48
- aria-label="{{ nextAriaLabel }}{% if params.nextExtraLabel %} - {{ params.nextExtraLabel }}{% endif %}">
50
+ {%- if nextAriaLabel -%}
51
+ aria-label="{{ nextAriaLabel }}{% if params.nextExtraLabel %} - {{ params.nextExtraLabel }}{% endif %}"
52
+ {%- endif -%}>
49
53
  {% if not params.hideIcons -%}
50
54
  {{ MdsIcon({
51
55
  iconName: 'chevron-right',
@@ -7,10 +7,6 @@ module.exports = {
7
7
  prevUrl: '/prev-page',
8
8
  nextUrl: '/next-page',
9
9
  id: 'default',
10
- i18n: {
11
- prevAriaLabel: 'Previous job',
12
- nextAriaLabel: 'Next job',
13
- },
14
10
  },
15
11
  variants: [
16
12
  {
@@ -97,5 +93,21 @@ module.exports = {
97
93
  },
98
94
  },
99
95
  },
96
+ {
97
+ name: 'No Aria Labels',
98
+ context: {
99
+ fractalTitle: 'No Aria Labels',
100
+ classes: 'mds-font-s-1',
101
+ prevUrl: '/prev-page',
102
+ nextUrl: '/next-page',
103
+ backToUrl: '/results/',
104
+ id: 'pag-4',
105
+ i18n: {
106
+ backToLabel: 'Return',
107
+ prevLabel: 'Previous',
108
+ nextLabel: 'Next',
109
+ },
110
+ },
111
+ },
100
112
  ],
101
113
  };