@everchron/ec-shards 6.2.2 → 7.0.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.
Files changed (111) hide show
  1. package/dist/ec-shards.common.js +3154 -2114
  2. package/dist/ec-shards.common.js.map +1 -1
  3. package/dist/ec-shards.css +1 -1
  4. package/dist/ec-shards.umd.js +3154 -2114
  5. package/dist/ec-shards.umd.js.map +1 -1
  6. package/dist/ec-shards.umd.min.js +2 -2
  7. package/dist/ec-shards.umd.min.js.map +1 -1
  8. package/package.json +1 -1
  9. package/src/components/action-toolbar/action-toolbar.vue +1 -1
  10. package/src/components/alert/alert.vue +27 -4
  11. package/src/components/avatar/avatar.vue +2 -1
  12. package/src/components/breadcrumb/breadcrumb.vue +2 -2
  13. package/src/components/breadcrumb-button/breadcrumb-button.vue +15 -3
  14. package/src/components/breadcrumb-title/breadcrumb-title.vue +1 -1
  15. package/src/components/button/button.vue +65 -54
  16. package/src/components/button-collapse/button-collapse.vue +49 -6
  17. package/src/components/button-context/button-context.vue +30 -1
  18. package/src/components/button-dialog/button-dialog.vue +22 -8
  19. package/src/components/button-more/button-more.vue +44 -4
  20. package/src/components/button-table/button-table.vue +13 -1
  21. package/src/components/button-toolbar/button-toolbar.vue +50 -19
  22. package/src/components/button-toolbar-icon/button-toolbar-icon.vue +23 -7
  23. package/src/components/checkbox/checkbox.vue +0 -1
  24. package/src/components/collapse/collapse.vue +28 -7
  25. package/src/components/collection-control/collection-control.vue +40 -7
  26. package/src/components/comment/comment.vue +1 -1
  27. package/src/components/context-menu/context-menu.vue +88 -5
  28. package/src/components/data-card/data-card.vue +52 -14
  29. package/src/components/data-card-list/data-card-list.vue +1 -1
  30. package/src/components/data-grid/data-grid-cell.vue +1 -1
  31. package/src/components/data-grid/data-grid-group.vue +6 -1
  32. package/src/components/data-grid/data-grid-head-cell.vue +32 -2
  33. package/src/components/data-grid/data-grid-row.vue +1 -1
  34. package/src/components/data-grid/data-grid.vue +2 -2
  35. package/src/components/data-list/data-list.vue +1 -1
  36. package/src/components/data-list-item/data-list-item.vue +28 -9
  37. package/src/components/directory-entry/directory-entry.vue +7 -4
  38. package/src/components/document-state/document-state.vue +1 -1
  39. package/src/components/dropdown/dropdown.vue +23 -1
  40. package/src/components/dropzone/dropzone.vue +21 -3
  41. package/src/components/empty-state/empty-state.vue +1 -1
  42. package/src/components/entry-link/entry-link.vue +16 -3
  43. package/src/components/favicon/favicon.vue +1 -1
  44. package/src/components/file-icon/file-icon.vue +1 -1
  45. package/src/components/file-list/file-list.vue +1 -1
  46. package/src/components/file-list-item/file-list-item.vue +79 -17
  47. package/src/components/flag/flag.vue +75 -1
  48. package/src/components/folder-selector/folder-selector.vue +1 -1
  49. package/src/components/form-check/form-check.vue +9 -2
  50. package/src/components/form-set/form-set.vue +4 -4
  51. package/src/components/index.js +2 -0
  52. package/src/components/input-clear/input-clear.vue +20 -3
  53. package/src/components/jumper-document/jumper-document.vue +16 -4
  54. package/src/components/jumper-index/jumper-index.vue +19 -4
  55. package/src/components/jumper-page/jumper-page.vue +3 -1
  56. package/src/components/layout-data-table/layout-data-table.vue +5 -5
  57. package/src/components/layout-directory/layout-directory.vue +4 -4
  58. package/src/components/layout-index/layout-index.vue +2 -2
  59. package/src/components/legend-item/legend-item.vue +15 -1
  60. package/src/components/log-message/log-message.vue +11 -1
  61. package/src/components/map/map.vue +20 -3
  62. package/src/components/mixins/focus-ring.vue +47 -0
  63. package/src/components/mixins/unique-id.js +17 -0
  64. package/src/components/modal/modal.vue +5 -2
  65. package/src/components/modal-header/modal-header.vue +43 -19
  66. package/src/components/multiselect-option/multiselect-option.vue +1 -1
  67. package/src/components/multiselect-search-token/multiselect-search-token.vue +33 -6
  68. package/src/components/multiselect-token/multiselect-token.vue +28 -3
  69. package/src/components/overlay/overlay.vue +6 -6
  70. package/src/components/pagination/pagination.vue +5 -5
  71. package/src/components/popover-list/popover-list.vue +5 -1
  72. package/src/components/popover-list-headline/popover-list-headline.vue +4 -1
  73. package/src/components/popover-list-item/popover-list-item.vue +27 -8
  74. package/src/components/progress/progress.vue +7 -1
  75. package/src/components/quicklink/quicklink.vue +29 -18
  76. package/src/components/radiobutton/radiobutton.vue +2 -2
  77. package/src/components/rating-favorability/rating-favorability.vue +5 -1
  78. package/src/components/rating-star-read/rating-star-read.vue +1 -1
  79. package/src/components/select/select.vue +12 -2
  80. package/src/components/select-text/select-text.vue +7 -2
  81. package/src/components/select-tile/select-tile.vue +26 -2
  82. package/src/components/separator/separator.vue +1 -1
  83. package/src/components/sequence-map/sequence-map.vue +1 -1
  84. package/src/components/sequence-map-button/sequence-map-button.vue +14 -2
  85. package/src/components/sidebar-footer/sidebar-footer.vue +2 -2
  86. package/src/components/sidebar-header/sidebar-header.vue +2 -2
  87. package/src/components/sortbutton/sortbutton.vue +22 -7
  88. package/src/components/sticker/sticker.vue +1 -1
  89. package/src/components/swatches-picker/swatches-picker.vue +28 -3
  90. package/src/components/switch/switch.vue +24 -8
  91. package/src/components/tab/tab.vue +16 -2
  92. package/src/components/tab-bar/tab-bar.vue +1 -1
  93. package/src/components/tab-button/tab-button.vue +61 -1
  94. package/src/components/tabs/tabs.vue +2 -1
  95. package/src/components/tag/tag.vue +17 -5
  96. package/src/components/tag-cloud/tag-cloud.vue +3 -1
  97. package/src/components/toast/toast.vue +18 -3
  98. package/src/components/toasts/toasts.vue +1 -1
  99. package/src/components/toolbar/toolbar.vue +1 -1
  100. package/src/components/transcript-state/transcript-state.vue +1 -1
  101. package/src/components/tree-list/tree-list-item.vue +77 -12
  102. package/src/components/tree-list/tree-list.vue +7 -1
  103. package/src/stories/Changelog.stories.mdx +8 -0
  104. package/src/stories/button/button.stories.js +7 -7
  105. package/src/stories/button-more/button-more.stories.js +8 -8
  106. package/src/stories/button-toolbar/button-toolbar.stories.js +5 -5
  107. package/src/stories/button-toolbar-icon/button-toolbar-icon.stories.js +6 -6
  108. package/src/stories/popover-list/popover-list.stories.js +7 -2
  109. package/src/stories/sortbutton/sortbutton.stories.js +4 -4
  110. package/src/stories/tag/tag.stories.js +7 -7
  111. package/src/stories/tree-list/tree-list.stories.js +3 -0
@@ -1,5 +1,9 @@
1
1
  <template>
2
- <div class="ecs-entry-link" @click.stop="handleClick">
2
+ <div @click.stop="handleClick"
3
+ tabindex="0"
4
+ role="button"
5
+ class="ecs-entry-link">
6
+
3
7
  <div v-if="icon" class="entry-icon" :title="iconTitle">
4
8
  <ecs-icon v-if="icon" :type="icon" :color="iconColor" size="20" />
5
9
  <ecs-sticker v-if="sticker" :type="sticker" />
@@ -13,8 +17,9 @@
13
17
  <!-- @slot Slot for additional appended content that should follow the title. Use with care. -->
14
18
  <slot name="appender"></slot>
15
19
  </div>
20
+ <ecs-focus-ring :inset="0" :radius="6" />
16
21
 
17
- <ecs-button-more v-if="moreButton" @click.stop="handleMoreButtonClick" type="ellipsis" :title="moreButtonTitle" />
22
+ <ecs-button-more v-if="moreButton" @click.stop="handleMoreButtonClick" type="ellipsis" :title="moreButtonTitle" :aria-label="moreButtonTitle" />
18
23
  </div>
19
24
  </template>
20
25
 
@@ -22,12 +27,14 @@
22
27
  import EcsIcon from '../icon/icon'
23
28
  import EcsSticker from '../sticker/sticker'
24
29
  import EcsButtonMore from '../button-more/button-more'
30
+ import EcsFocusRing from '../mixins/focus-ring'
25
31
 
26
32
  export default {
27
33
  components: {
28
34
  EcsIcon,
29
35
  EcsSticker,
30
- EcsButtonMore
36
+ EcsButtonMore,
37
+ EcsFocusRing
31
38
  },
32
39
  props: {
33
40
  /** If set, an icon will be added to the left of the button. The list of available icon names can be found [here](https://github.com/everchron/ec-shards/tree/main/src/assets/icons). */
@@ -117,6 +124,12 @@
117
124
  max-width: 100%;
118
125
  color: $color-gray-15;
119
126
 
127
+ &:focus-visible{
128
+ .ecs-focus-ring{
129
+ display: block;
130
+ }
131
+ }
132
+
120
133
  &:after{
121
134
  content: "";
122
135
  background: rgba($color-gray-8, .07);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-favicon" :class="this.website" />
2
+ <div class="ecs-favicon" :class="this.website" role="img" :alt="website + ' icon'" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <i class="icon ecs-file-icon" :class="typeClass" :style="{ width: width + 'px', height: height + 'px' }" />
2
+ <i class="icon ecs-file-icon" :class="typeClass" :style="{ width: width + 'px', height: height + 'px' }" role="presentation" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-file-list">
2
+ <div class="ecs-file-list" role="list">
3
3
  <slot></slot>
4
4
  </div>
5
5
  </template>
@@ -1,9 +1,14 @@
1
1
  <template>
2
- <div @click="$emit('click', $event)" class="ecs-file-list-entry"
2
+ <div @click="$emit('click', $event)"
3
+ class="ecs-file-list-entry"
3
4
  :class="[
4
5
  above ? 'ecs-file-list-entry-above' : '',
5
6
  hover ? 'hover' : '',
6
- (interactiveHover && $slots.edit) ? 'hover' : '']">
7
+ (interactiveHover && $slots.edit) ? 'hover' : '']"
8
+ role="listitem"
9
+ :tabindex="hover ? '0' : '-1'">
10
+
11
+ <ecs-focus-ring v-if="hover" />
7
12
 
8
13
  <transition name="title">
9
14
  <div v-if="showTitleEdit || !edit" class="ecs-file-list-inner">
@@ -12,7 +17,7 @@
12
17
  <ecs-sticker v-if="(icon || fileIcon) && sticker" :type="sticker" />
13
18
 
14
19
  <div @click="$emit('title-click', $event)" @mouseover="setInteractiveHover" @mouseleave="interactiveHover = false" class="ecs-file-list-title">
15
- <div class="title">
20
+ <div class="title" :aria-errormessage="error ? errorId : false">
16
21
  <slot></slot>
17
22
  </div>
18
23
  </div>
@@ -25,27 +30,46 @@
25
30
  <!-- @slot Slot for additional controls at the right side of the list item. -->
26
31
  <slot name="controls"></slot>
27
32
  <ecs-icon v-if="error" type="warning" color="#ff3750" class="ml-2" />
28
- <button class="ecs-file-list-button expand"
29
- v-if="$slots.collapse"
30
- :class="isVisible ? '' : 'collapsed'"
31
- @click="toggleCollapse" />
32
- <ecs-button-table v-if="remove" @click="$emit('remove', $event)" :loading="removeLoading" icon="close" class="remove" />
33
+ <button
34
+ v-if="$slots.collapse"
35
+ @click="toggleCollapse"
36
+ class="ecs-file-list-button expand"
37
+ :class="isVisible ? '' : 'collapsed'"
38
+ :aria-controls="expandId"
39
+ :aria-expanded="isVisible ? 'true' : 'false'"
40
+ :aria-label="isVisible ? 'Collapse' : 'Expand'">
41
+ <ecs-focus-ring />
42
+ </button>
43
+ <ecs-button-table
44
+ @click="$emit('remove', $event)"
45
+ v-if="remove"
46
+ :loading="removeLoading"
47
+ :disabled="removeLoading"
48
+ aria-label="Remove"
49
+ icon="close"
50
+ class="remove"
51
+ />
52
+ </div>
53
+ <div v-if="progress"
54
+ class="loading-bar"
55
+ :style="{ width: progress + '%' }"
56
+ role="progressbar"
57
+ :aria-valuenow="progress">
33
58
  </div>
34
- <div v-if="progress" class="loading-bar" :style="{ width: progress + '%' }"></div>
35
59
  </div>
36
60
  </transition>
37
61
 
38
- <div v-if="error" class="error">
62
+ <div v-if="error" class="error" :id="errorId">
39
63
  {{ error }}
40
64
  </div>
41
65
 
42
- <div v-if="$slots.collapse" :class="isVisible ? 'collapse-show' : 'collapse-hide'">
66
+ <div v-if="$slots.collapse" :class="isVisible ? 'collapse-show' : 'collapse-hide'" :id="expandId" :aria-hidden="isVisible ? 'false' : 'true'">
43
67
  <!-- @slot Slot for expandable content. -->
44
68
  <slot name="collapse"></slot>
45
69
  </div>
46
70
 
47
71
  <transition name="edit">
48
- <div v-if="$slots.edit && edit" :style="{ maxHeight: editHeight + 'px' }">
72
+ <div v-if="$slots.edit && edit" :style="{ maxHeight: editHeight + 'px' }" :id="editId">
49
73
  <div ref="edit" class="ecs-file-list-entry-edit">
50
74
  <!-- @slot Slot for content in the edit form. -->
51
75
  <slot name="edit"></slot>
@@ -60,9 +84,18 @@
60
84
  import EcsFileIcon from '../file-icon/file-icon'
61
85
  import EcsSticker from '../sticker/sticker'
62
86
  import EcsButtonTable from '../button-table/button-table'
87
+ import EcsFocusRing from '../mixins/focus-ring'
88
+ import { uniqueIdMixin } from '../mixins/unique-id'
63
89
 
64
90
  export default {
65
- components: { EcsIcon, EcsFileIcon, EcsSticker, EcsButtonTable },
91
+ components: {
92
+ EcsIcon,
93
+ EcsFileIcon,
94
+ EcsSticker,
95
+ EcsButtonTable,
96
+ EcsFocusRing
97
+ },
98
+ mixins: [uniqueIdMixin],
66
99
 
67
100
  props: {
68
101
  /** Adds a button to the right of the list items, which allows to remove/delete the item. Emits the `@remove` event on click. */
@@ -135,7 +168,9 @@
135
168
  return {
136
169
  isVisible: this.visible,
137
170
  editHeight: 0,
138
- interactiveHover: false
171
+ interactiveHover: false,
172
+ expandId: '',
173
+ errorId: ''
139
174
  }
140
175
  },
141
176
 
@@ -172,6 +207,11 @@
172
207
  })
173
208
  }
174
209
  }
210
+ },
211
+
212
+ created() {
213
+ this.expandId = this.generateUniqueId()
214
+ this.errorId = this.generateUniqueId()
175
215
  }
176
216
  }
177
217
  </script>
@@ -186,6 +226,15 @@
186
226
  transition: .2s;
187
227
  background: #FFF;
188
228
 
229
+ &:focus-visible{
230
+ z-index: 1;
231
+ outline: none;
232
+
233
+ .ecs-focus-ring{
234
+ display: block;
235
+ }
236
+ }
237
+
189
238
  &:after{
190
239
  content: "";
191
240
  position: absolute;
@@ -297,7 +346,6 @@
297
346
  border-radius: $border-radius-x-small;
298
347
  margin-left: 20px;
299
348
  padding: 0;
300
- opacity: .7;
301
349
  transition: .2s;
302
350
  position: relative;
303
351
 
@@ -305,6 +353,15 @@
305
353
  opacity: 1;
306
354
  }
307
355
 
356
+ &:focus-visible{
357
+ z-index: 1;
358
+ outline: none;
359
+
360
+ .ecs-focus-ring{
361
+ display: block;
362
+ }
363
+ }
364
+
308
365
  &:before{
309
366
  content: "";
310
367
  position: absolute;
@@ -312,19 +369,24 @@
312
369
  height: 16px;
313
370
  top: 0;
314
371
  left: 0;
372
+ opacity: .7;
315
373
  }
316
374
 
317
375
  &.expand{
318
376
  transform: rotate(180deg);
319
- opacity: 1;
320
377
 
321
378
  &:before{
379
+ opacity: 1;
380
+ transition: .2s;
322
381
  background: svg-uri('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><polygon fill="#858E9E" points="8.009 11.2 12.8 6.003 11.708 4.819 8.009 8.829 4.292 4.8 3.2 5.984"/></svg>');
323
382
  }
324
383
 
325
384
  &.collapsed{
326
385
  transform: rotate(0);
327
- opacity: .7;
386
+
387
+ &:before{
388
+ opacity: .7;
389
+ }
328
390
  }
329
391
  }
330
392
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="ecs-flag" :class="this.code" />
2
+ <div class="ecs-flag" :class="this.code" role="img" :alt="flagTitle" />
3
3
  </template>
4
4
 
5
5
  <script>
@@ -45,6 +45,80 @@ export default {
45
45
  null
46
46
  ].includes(v)
47
47
  }
48
+ },
49
+
50
+ computed: {
51
+ flagTitle() {
52
+ switch (this.code) {
53
+ case 'ar':
54
+ return 'Flag of Argentina';
55
+ case 'bg':
56
+ return 'Flag of Bulgaria';
57
+ case 'zhcn':
58
+ return 'Flag of China';
59
+ case 'zhtw':
60
+ return 'Flag of China';
61
+ case 'da':
62
+ return 'Flag of Denmark';
63
+ case 'nl':
64
+ return 'Flag of Netherlands';
65
+ case 'en':
66
+ return 'Flag of United Kingdom';
67
+ case 'eu':
68
+ return 'Flag of European Union';
69
+ case 'gb':
70
+ return 'Flag of Great Britain';
71
+ case 'au':
72
+ return 'Flag of Australia';
73
+ case 'ca':
74
+ return 'Flag of Canada';
75
+ case 'et':
76
+ return 'Flag of Estonia';
77
+ case 'fr':
78
+ return 'Flag of France';
79
+ case 'de':
80
+ return 'Flag of Germany';
81
+ case 'el':
82
+ return 'Flag of Greece';
83
+ case 'he':
84
+ return 'Flag of Israel';
85
+ case 'it':
86
+ return 'Flag of Italy';
87
+ case 'ja':
88
+ return 'Flag of Japan';
89
+ case 'ko':
90
+ return 'Flag of Korea';
91
+ case 'lv':
92
+ return 'Flag of Latvia';
93
+ case 'lt':
94
+ return 'Flag of Lithuania';
95
+ case 'no':
96
+ return 'Flag of Norway';
97
+ case 'fa':
98
+ return 'Flag of Iran';
99
+ case 'pl':
100
+ return 'Flag of Poland';
101
+ case 'pt':
102
+ return 'Flag of Portugal';
103
+ case 'ro':
104
+ return 'Flag of Romania';
105
+ case 'ru':
106
+ return 'Flag of Russia';
107
+ case 'es':
108
+ return 'Flag of Spain';
109
+ case 'sv':
110
+ return 'Flag of Sweden';
111
+ case 'tr':
112
+ return 'Flag of Turkey';
113
+ case 'us':
114
+ return 'Flag of United States';
115
+ case 'null':
116
+ case null:
117
+ return 'Unknown flag';
118
+ default:
119
+ return `Flag of ${this.code}`;
120
+ }
121
+ }
48
122
  }
49
123
  }
50
124
  </script>
@@ -2,7 +2,7 @@
2
2
  <div class="ecs-folder-selector" :class="[framed ? 'ecs-folder-selector-border' : '']" :style="{height: isFullHeight}">
3
3
  <div v-if="searchable || create" class="ecs-folder-selector-header">
4
4
  <ecs-input-search v-if="searchable" v-model="searchInputValue" @input="searchInput" type="naked" :show-clear="showClear" class="ecs-folder-selector-search" placeholder="Search for folders..." />
5
- <ecs-button v-if="create" @click="handleAddFolder" icon="folder-new" class="ecs-folder-selector-add">Add Folder</ecs-button>
5
+ <ecs-button v-if="create" @click="handleAddFolder" icon="folder-new" class="ecs-folder-selector-add" :focus-inset="0">Add Folder</ecs-button>
6
6
  </div>
7
7
  <ecs-scroll-container :height="height" :padding="framed ? '8px' : '0'" borderless>
8
8
  <!-- @slot Should always contain an EcsTreeList with the selectable options. -->
@@ -5,11 +5,16 @@
5
5
  disabled ? 'disabled' : '']">
6
6
 
7
7
  <slot></slot>
8
+ <ecs-focus-ring />
8
9
  </div>
9
10
  </template>
10
11
 
11
12
  <script>
13
+ import EcsFocusRing from '../mixins/focus-ring'
14
+
12
15
  export default {
16
+ components: { EcsFocusRing },
17
+
13
18
  props: {
14
19
  /** Sets the checkbox to disabled. */
15
20
  disabled: {
@@ -112,8 +117,10 @@
112
117
  // Box focus
113
118
  &:focus + label:before {
114
119
  outline: none;
115
- border-color: rgba($color-blue-10, .3);
116
- box-shadow: 0 0 0 2px rgba($color-blue-10, .2);
120
+ }
121
+
122
+ &:focus-visible ~ .ecs-focus-ring{
123
+ display: block;
117
124
  }
118
125
 
119
126
  // Box checked
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="ecs-form-set" :class="error ? 'error' : ''">
3
- <h5 class="ecs-form-set-title">{{ title }}</h5>
2
+ <fieldset class="ecs-form-set" :class="error ? 'error' : ''" :aria-invalid="error">
3
+ <legend class="ecs-form-set-title">{{ title }}</legend>
4
4
  <slot></slot>
5
- </div>
5
+ </fieldset>
6
6
  </template>
7
7
 
8
8
  <script>
@@ -31,6 +31,7 @@
31
31
  border-radius: $border-radius-medium;
32
32
  position: relative;
33
33
  padding: 25px 20px 20px 20px;
34
+ margin: 0;
34
35
 
35
36
  &-title{
36
37
  position: absolute;
@@ -50,5 +51,4 @@
50
51
  }
51
52
  }
52
53
  }
53
-
54
54
  </style>
@@ -55,6 +55,7 @@ import EcsFileListItem from "./file-list-item/file-list-item.vue"
55
55
  import EcsFlag from "./flag/flag.vue"
56
56
  import EcsFlexCol from "./flex/flex-col.vue"
57
57
  import EcsFlexRow from "./flex/flex-row.vue"
58
+ import EcsFocusRing from "./mixins/focus-ring.vue"
58
59
  import EcsFolderSelector from "./folder-selector/folder-selector.vue"
59
60
  import EcsFormCheck from "./form-check/form-check.vue"
60
61
  import EcsFormGroup from "./form-group/form-group.vue"
@@ -190,6 +191,7 @@ const Components = {
190
191
  EcsFlag,
191
192
  EcsFlexCol,
192
193
  EcsFlexRow,
194
+ EcsFocusRing,
193
195
  EcsFolderSelector,
194
196
  EcsFormCheck,
195
197
  EcsFormGroup,
@@ -1,16 +1,25 @@
1
1
  <template>
2
- <div class="ecs-input-clear">
3
- <button @click="$emit('click', $event)" :title="tooltip" class="ecs-input-clear-button" />
2
+ <div class="ecs-input-clear" :aria-busy="loading">
3
+ <button
4
+ @click="$emit('click', $event)"
5
+ @keydown.enter="$emit('click', $event)"
6
+ :title="tooltip"
7
+ class="ecs-input-clear-button"
8
+ aria-label="Clear">
9
+ <ecs-focus-ring :radius="24" />
10
+ </button>
4
11
  <ecs-icon v-if="loading" type="loading" size="32" spinning color="#AEB1B9" />
5
12
  </div>
6
13
  </template>
7
14
 
8
15
  <script>
9
16
  import EcsIcon from '../icon/icon'
17
+ import EcsFocusRing from '../mixins/focus-ring'
10
18
 
11
19
  export default {
12
20
  components: {
13
- EcsIcon
21
+ EcsIcon,
22
+ EcsFocusRing
14
23
  },
15
24
 
16
25
  props: {
@@ -56,6 +65,14 @@ export default {
56
65
  &:hover{
57
66
  opacity: 1;
58
67
  }
68
+
69
+ &:focus-visible{
70
+ outline: none;
71
+
72
+ .ecs-focus-ring{
73
+ display: block;
74
+ }
75
+ }
59
76
  }
60
77
 
61
78
  .icon{
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <ecs-button-toolbar-group class="ecs-viewer-toolbar-jumper">
3
- <ecs-button-toolbar @click="$emit('goToPrev')" :disabled="currentEntry == 1 || navigating" class="previous" :title="prevTooltip" icon="toolbar-page-navigation" />
3
+ <ecs-button-toolbar @click="$emit('goToPrev')" :disabled="currentEntry == 1 || navigating" class="previous" :title="prevTooltip" icon="toolbar-page-navigation" :aria-label="ariaLabelPrev" />
4
4
  <div v-if="showCount" class="ecs-viewer-toolbar-jumper-inputs">
5
- <div v-html="currentEntry" @click="$emit('selectCurEntryText')" @keydown="indexPosKeyPressed" @blur="$emit('blur')" contenteditable class="ecs-viewer-toolbar-jumper-input" :disabled="navigating" id="currEntry"></div>
5
+ <div @click="$emit('selectCurEntryText')" @keydown="indexPosKeyPressed" @blur="$emit('blur')" contenteditable class="ecs-viewer-toolbar-jumper-input" :disabled="navigating" id="currEntry">{{ currentEntry }}</div>
6
6
  /&nbsp;
7
7
  <div>{{ totalEntries }}</div>
8
8
  </div>
9
- <ecs-button-toolbar @click="$emit('goToNext')" :disabled="currentEntry == totalEntries || navigating" class="next" :title="nextTooltip" icon="toolbar-page-navigation" />
9
+ <ecs-button-toolbar @click="$emit('goToNext')" :disabled="currentEntry == totalEntries || navigating" class="next" :title="nextTooltip" icon="toolbar-page-navigation" :aria-label="ariaLabelNext" />
10
10
  </ecs-button-toolbar-group>
11
11
  </template>
12
12
 
@@ -52,11 +52,20 @@
52
52
  else
53
53
  return ''
54
54
  },
55
+
55
56
  nextTooltip(){
56
57
  if(this.currentEntry != this.totalEntries)
57
58
  return this.tooltipNoun ? `Next ${ this.tooltipNoun }` : 'Next'
58
59
  else
59
60
  return ''
61
+ },
62
+
63
+ ariaLabelPrev(){
64
+ return this.tooltipNoun ? `Previous ${this.tooltipNoun}` : 'Previous'
65
+ },
66
+
67
+ ariaLabelNext() {
68
+ return this.tooltipNoun ? `Next ${this.tooltipNoun}` : 'Next'
60
69
  }
61
70
  },
62
71
 
@@ -97,7 +106,6 @@
97
106
 
98
107
  &-input{
99
108
  border-radius: $border-radius-small;
100
- transition: .2s;
101
109
  background-color: rgba(90, 97, 102, 0.15);
102
110
  border: none;
103
111
  display: block;
@@ -108,6 +116,10 @@
108
116
  font-size: $type-scale-3-font-size;
109
117
  width: auto;
110
118
  color: $color-gray-13;
119
+
120
+ &:focus{
121
+ outline: 1px solid $color-gray-5;
122
+ }
111
123
  }
112
124
  }
113
125
  </style>
@@ -1,16 +1,18 @@
1
1
  <template>
2
2
  <ecs-button-toolbar-group class="ecs-jumper">
3
- <ecs-button-toolbar @click="previousSearchResult" :disabled="currentCount <= 1" :title="prevTooltip" class="ecs-jumper-previous" />
3
+ <ecs-button-toolbar @click="previousSearchResult" :disabled="currentCount <= 1" :title="prevTooltip" :aria-label="ariaLabelPrev" class="ecs-jumper-previous" />
4
4
  <div class="ecs-jumper-count" v-if="showCount && !inputPagination">
5
5
  <span class="ecs-jumper-count-current">{{ currentPosition }}</span>
6
6
  <span class="ecs-jumper-count-total">/{{ maxCount }}</span>
7
7
  </div>
8
8
  <div class="ecs-jumper-count-inputs" v-if="inputPagination">
9
- <div v-html="currentCount" @click="selectSearchResultCount" @keydown="setSearchResultCount" class="ecs-jumper-count-input" contenteditable></div>
9
+ <div @click="selectSearchResultCount" @keydown="setSearchResultCount" class="ecs-jumper-count-input" contenteditable>
10
+ {{ currentCount }}
11
+ </div>
10
12
  of&nbsp;
11
13
  <div>{{ maxCount }}</div>
12
14
  </div>
13
- <ecs-button-toolbar @click="nextSearchResult" :disabled="currentCount == maxCount" :title="nextTooltip" class="ecs-jumper-next" />
15
+ <ecs-button-toolbar @click="nextSearchResult" :disabled="currentCount == maxCount" :title="nextTooltip" :aria-label="ariaLabelNext" class="ecs-jumper-next" />
14
16
  </ecs-button-toolbar-group>
15
17
  </template>
16
18
 
@@ -55,17 +57,27 @@
55
57
  currentPosition(){
56
58
  return this.currentCount < 1 ? '-' : this.currentCount
57
59
  },
60
+
58
61
  prevTooltip(){
59
62
  if(this.currentCount > 1)
60
63
  return this.tooltipNoun ? `Previous ${ this.tooltipNoun }` : 'Previous'
61
64
  else
62
65
  return ''
63
66
  },
67
+
64
68
  nextTooltip(){
65
69
  if(this.currentCount != this.maxCount)
66
70
  return this.tooltipNoun ? `Next ${ this.tooltipNoun }` : 'Next'
67
71
  else
68
72
  return ''
73
+ },
74
+
75
+ ariaLabelPrev() {
76
+ return this.tooltipNoun ? `Previous ${this.tooltipNoun}` : 'Previous'
77
+ },
78
+
79
+ ariaLabelNext() {
80
+ return this.tooltipNoun ? `Next ${this.tooltipNoun}` : 'Next'
69
81
  }
70
82
  },
71
83
 
@@ -143,7 +155,6 @@
143
155
 
144
156
  &-input{
145
157
  border-radius: $border-radius-small;
146
- transition: .2s;
147
158
  background-color: rgba(90, 97, 102, 0.15);
148
159
  border: none;
149
160
  display: block;
@@ -154,6 +165,10 @@
154
165
  font-size: $type-scale-3-font-size;
155
166
  width: auto;
156
167
  color: $color-gray-13;
168
+
169
+ &:focus{
170
+ outline: 1px solid $color-gray-5;
171
+ }
157
172
  }
158
173
  }
159
174
  }
@@ -4,7 +4,9 @@
4
4
 
5
5
  <template v-if="showRelative">
6
6
  <div class="ecs-viewer-pages-pagination">
7
- <div v-html="currentPage" @click="$emit('selectCurPageText')" @keydown="pageKeyPressed($event, 'relative')" @blur="$emit('currentPageBlurred')" contenteditable class="current-page" id="currPage"></div>
7
+ <div @click="$emit('selectCurPageText')" @keydown="pageKeyPressed($event, 'relative')" @blur="$emit('currentPageBlurred')" contenteditable class="current-page" id="currPage">
8
+ {{ currentPage }}
9
+ </div>
8
10
  <div class="total-pages">of {{ lastPage }}</div>
9
11
  </div>
10
12
  <div class="ecs-viewer-pages-pagination">
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="ecs-data-layout">
3
- <div class="ecs-data-layout-content">
4
- <div v-if="$slots.toolbar" class="ecs-data-layout-toolbar">
3
+ <main class="ecs-data-layout-content">
4
+ <div v-if="$slots.toolbar" role="toolbar" aria-label="Main" class="ecs-data-layout-toolbar">
5
5
  <!-- @slot Slot for a toolbar. -->
6
6
  <slot name="toolbar"></slot>
7
7
  </div>
@@ -14,9 +14,9 @@
14
14
  <div class="ecs-data-layout-data">
15
15
  <slot></slot>
16
16
  </div>
17
- </div>
17
+ </main>
18
18
 
19
- <div v-if="$slots.sidebarcontent || $slots.sidebarheader" class="ecs-data-layout-sidebar" :class="sidebarExpanded ? 'expanded' : ''">
19
+ <aside v-if="$slots.sidebarcontent || $slots.sidebarheader" class="ecs-data-layout-sidebar" :class="sidebarExpanded ? 'expanded' : ''">
20
20
  <div class="ecs-data-layout-sidebar-inner">
21
21
  <div v-if="$slots.sidebarheader" class="ecs-data-layout-sidebar-header">
22
22
  <!-- @slot Slot for the content of the sidebar header. -->
@@ -28,7 +28,7 @@
28
28
  <slot name="sidebarcontent"></slot>
29
29
  </div>
30
30
  </div>
31
- </div>
31
+ </aside>
32
32
  </div>
33
33
  </template>
34
34
 
@@ -8,14 +8,14 @@
8
8
 
9
9
  <div class="ecs-directory-layout-wrap">
10
10
  <div class="ecs-directory-layout-contents">
11
- <div v-if="$slots.directory" class="ecs-directory-layout-directory">
11
+ <aside v-if="$slots.directory" class="ecs-directory-layout-directory">
12
12
  <!-- @slot Slot for the directory list items. -->
13
13
  <slot name="directory"></slot>
14
- </div>
15
- <div class="ecs-directory-layout-entry scrollbar" :class="[$slots.sidebar ? 'has-sidebar' : '']">
14
+ </aside>
15
+ <main class="ecs-directory-layout-entry scrollbar" :class="[$slots.sidebar ? 'has-sidebar' : '']">
16
16
  <!-- @slot Slot for the main content area. -->
17
17
  <slot></slot>
18
- </div>
18
+ </main>
19
19
  <div v-if="$slots.sidebar" class="ecs-directory-layout-sidebar">
20
20
  <!-- @slot Slot for the sidebar. -->
21
21
  <slot name="sidebar"></slot>