Skip to content

Commit d91b3d2

Browse files
committed
bugfix(design-system, web-app-admin, web-app-files, web-app-search, web-pg): [OCISDEV-389] fix ui issues
1 parent d01078b commit d91b3d2

File tree

25 files changed

+100
-51
lines changed

25 files changed

+100
-51
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Fix ui issues
2+
3+
We have fixed some ui issues to improve the user experience.
4+
5+
https://kiteworks.atlassian.net/browse/OCISDEV-389
6+
https://github.com/owncloud/web/pull/13255

packages/design-system/src/components/OcCheckbox/OcCheckbox.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
:aria-label="labelHidden ? label : null"
1616
@keydown.enter="keydownEnter"
1717
/>
18-
<label v-if="!labelHidden" :for="id" :class="labelClasses" v-text="label" />
18+
<label v-if="!labelHidden" :for="id" :class="computedLabelClasses" v-text="label" />
1919
</span>
2020
</template>
2121

@@ -69,6 +69,7 @@ interface Props {
6969
option?: unknown
7070
label?: string
7171
labelHidden?: boolean
72+
labelClasses?: string[]
7273
size?: 'small' | 'medium' | 'large'
7374
}
7475
interface Emits {
@@ -89,7 +90,8 @@ const {
8990
label = null,
9091
labelHidden = false,
9192
size = 'medium',
92-
modelValue = false
93+
modelValue = false,
94+
labelClasses = []
9395
} = defineProps<Props>()
9496
9597
const emit = defineEmits<Emits>()
@@ -114,7 +116,7 @@ const classes = computed(() => {
114116
]
115117
})
116118
117-
const labelClasses = computed(() => ({ 'oc-cursor-pointer': !disabled }))
119+
const computedLabelClasses = computed(() => [{ 'oc-cursor-pointer': !disabled }, ...labelClasses])
118120
119121
const isChecked = computed(() => {
120122
if (Array.isArray(model.value)) {

packages/design-system/src/components/OcDrop/OcDrop.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ function initializeTippy() {
240240
} as Modifier<'fixVerticalPosition', unknown>
241241
]
242242
},
243-
content
243+
content,
244+
role: 'listbox'
244245
}
245246
246247
if (unref(target)) {

packages/design-system/src/components/OcDrop/__snapshots__/OcDrop.spec.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports[`OcDrop > tippy > renders tippy 1`] = `
2121
data-reference-hidden=""
2222
data-state="visible"
2323
data-theme="none"
24-
role="tooltip"
24+
role="listbox"
2525
style="max-width: 416px; transition-duration: 300ms;"
2626
tabindex="-1"
2727
>
@@ -73,7 +73,7 @@ exports[`OcDrop > tippy > renders tippy 2`] = `
7373
data-reference-hidden=""
7474
data-state="hidden"
7575
data-theme="none"
76-
role="tooltip"
76+
role="listbox"
7777
style="max-width: 416px; transition-duration: 250ms;"
7878
tabindex="-1"
7979
>
@@ -125,7 +125,7 @@ exports[`OcDrop > tippy > renders tippy 3`] = `
125125
data-reference-hidden=""
126126
data-state="visible"
127127
data-theme="none"
128-
role="tooltip"
128+
role="listbox"
129129
style="max-width: 416px; transition-duration: 300ms;"
130130
tabindex="-1"
131131
>

packages/design-system/src/components/OcSearchBar/OcSearchBar.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
<div class="oc-width-expand oc-position-relative">
99
<input
1010
ref="searchInput"
11+
role="combobox"
12+
aria-autocomplete="list"
13+
:aria-expanded="ariaExpanded"
14+
:aria-controls="ariaControls"
1115
:class="inputClass"
1216
:aria-label="label"
1317
:value="searchQuery"
@@ -83,6 +87,8 @@ import { useGettext } from 'vue3-gettext'
8387
* @prop {string} [placeholder=''] - Placeholder text for the input field.
8488
* @prop {string} [label=''] - Aria-label for the input field.
8589
* @prop {boolean} [small=false] - Whether the search bar should be smaller in size.
90+
* @prop {string} [ariaExpanded='false'] - Indicates if the dropdown is expanded (for combobox).
91+
* @prop {string} [ariaControls=''] - ID of the dropdown element controlled by this input.
8692
* @prop {string} [buttonLabel='Search'] - Label for the search button.
8793
* @prop {boolean} [buttonHidden=false] - Whether to hide the search button visually.
8894
* @prop {boolean} [typeAhead=false] - If true, triggers the search event on each character input.
@@ -142,6 +148,8 @@ interface Props {
142148
cancelButtonVariation?: 'passive' | 'primary' | 'danger' | 'success' | 'warning' | 'brand'
143149
cancelButtonAppearance?: 'outline' | 'filled' | 'raw' | 'raw-inverse'
144150
cancelHandler?: () => void
151+
ariaExpanded?: string
152+
ariaControls?: string
145153
}
146154
147155
interface Emits {
@@ -172,7 +180,9 @@ const {
172180
showCancelButton = false,
173181
cancelButtonVariation = 'primary',
174182
cancelButtonAppearance = 'raw',
175-
cancelHandler = () => {}
183+
cancelHandler = () => {},
184+
ariaExpanded = 'false',
185+
ariaControls = ''
176186
} = defineProps<Props>()
177187
const emit = defineEmits<Emits>()
178188
const slots = useSlots()

packages/design-system/src/components/OcTable/OcTable.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
/>
4747
</oc-button>
4848
<div v-else>
49+
<span class="oc-invisible-sr">
50+
{{ field.name }}
51+
</span>
4952
<span v-if="field.headerType === 'slot'" class="oc-table-thead-content">
5053
<slot :name="field.name + 'Header'" />
5154
</span>

packages/design-system/src/tokens/ods/font.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ font:
66
default:
77
value: 0.875rem
88
xsmall:
9-
value: 0.72rem
9+
value: 0.80rem
1010
small:
1111
value: 0.86rem
1212
medium:

packages/web-app-admin-settings/src/components/General/AppearanceSection.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<div class="logo-wrapper">
2929
<img alt="" :src="currentTheme.logo.topbar" class="oc-p-xs" />
3030
</div>
31+
<label for="logo-upload-input" class="oc-invisible-sr">
32+
{{ $gettext('Change logo') }}
33+
</label>
3134
<input
3235
id="logo-upload-input"
3336
ref="logoInput"

packages/web-app-admin-settings/src/components/Users/UsersList.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
class="oc-ml-s"
2828
:label="$gettext('Select all users')"
2929
:model-value="allUsersSelected"
30-
:label-hidden="true"
30+
:label-hidden="false"
31+
:label-classes="['oc-invisible-sr']"
3132
@update:model-value="
3233
allUsersSelected ? unselectAllUsers() : selectUsers(paginatedItems)
3334
"

packages/web-app-admin-settings/tests/unit/components/Spaces/__snapshots__/SpacesList.spec.ts.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
1717
<thead class="oc-thead">
1818
<tr class="oc-table-header-row">
1919
<th class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-select oc-pl-s" style="top: 0px;">
20-
<div><span class="oc-table-thead-content"><oc-checkbox-stub id="oc-checkbox-1" modelvalue="false" disabled="false" label="Select all spaces" labelhidden="true" size="large" class="oc-ml-s"></oc-checkbox-stub></span></div>
20+
<div><span class="oc-invisible-sr">select</span> <span class="oc-table-thead-content"><oc-checkbox-stub id="oc-checkbox-1" modelvalue="false" disabled="false" label="Select all spaces" labelhidden="true" labelclasses="" size="large" class="oc-ml-s"></oc-checkbox-stub></span></div>
2121
</th>
2222
<th class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-icon" style="top: 0px;">
23-
<div><span class="oc-table-thead-content header-text"></span></div>
23+
<div><span class="oc-invisible-sr">icon</span> <span class="oc-table-thead-content header-text"></span></div>
2424
</th>
2525
<th class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-name" style="top: 0px;" aria-sort="ascending"><button type="button" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw oc-button-sort oc-width-1-1">
2626
<!--v-if-->
@@ -31,7 +31,7 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
3131
<!-- @slot Content of the button --> <span class="oc-table-thead-content header-text">Status</span> <span class="oc-icon oc-icon-s oc-icon-passive oc-invisible-sr"><!----></span>
3232
</button></th>
3333
<th class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-manager" style="top: 0px;">
34-
<div><span class="oc-table-thead-content header-text">Manager</span></div>
34+
<div><span class="oc-invisible-sr">manager</span> <span class="oc-table-thead-content header-text">Manager</span></div>
3535
</th>
3636
<th class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-members" style="top: 0px;"><button type="button" class="oc-button oc-rounded oc-button-m oc-button-justify-content-center oc-button-gap-m oc-button-passive oc-button-passive-raw oc-button-sort oc-width-1-1">
3737
<!--v-if-->
@@ -54,14 +54,14 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
5454
<!-- @slot Content of the button --> <span class="oc-table-thead-content header-text">Modified</span> <span class="oc-icon oc-icon-s oc-icon-passive oc-invisible-sr"><!----></span>
5555
</button></th>
5656
<th class="oc-table-cell oc-table-cell-align-right oc-table-cell-align-middle oc-table-cell-width-auto oc-text-nowrap oc-th oc-table-header-cell oc-table-header-cell-actions oc-pr-s" style="top: 0px;">
57-
<div><span class="oc-table-thead-content header-text">Actions</span></div>
57+
<div><span class="oc-invisible-sr">actions</span> <span class="oc-table-thead-content header-text">Actions</span></div>
5858
</th>
5959
</tr>
6060
</thead>
6161
<tbody class="has-item-context-menu">
6262
<tr class="oc-tbody-tr oc-tbody-tr-1" data-item-id="1" draggable="false">
6363
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-td oc-table-data-cell oc-table-data-cell-select oc-pl-s">
64-
<oc-checkbox-stub id="oc-checkbox-2" modelvalue="false" disabled="false" option="undefined" label="Select 1 Some space" labelhidden="true" size="large" class="oc-ml-s"></oc-checkbox-stub>
64+
<oc-checkbox-stub id="oc-checkbox-2" modelvalue="false" disabled="false" option="undefined" label="Select 1 Some space" labelhidden="true" labelclasses="" size="large" class="oc-ml-s"></oc-checkbox-stub>
6565
</td>
6666
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-td oc-table-data-cell oc-table-data-cell-icon"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></td>
6767
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-auto oc-td oc-table-data-cell oc-table-data-cell-name mark-element"><span class="spaces-table-space-name" data-test-space-name="1 Some space">1 Some space</span></td>
@@ -89,7 +89,7 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
8989
</tr>
9090
<tr class="oc-tbody-tr oc-tbody-tr-2" data-item-id="2" draggable="false">
9191
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-td oc-table-data-cell oc-table-data-cell-select oc-pl-s">
92-
<oc-checkbox-stub id="oc-checkbox-3" modelvalue="false" disabled="false" option="undefined" label="Select 2 Another space" labelhidden="true" size="large" class="oc-ml-s"></oc-checkbox-stub>
92+
<oc-checkbox-stub id="oc-checkbox-3" modelvalue="false" disabled="false" option="undefined" label="Select 2 Another space" labelhidden="true" labelclasses="" size="large" class="oc-ml-s"></oc-checkbox-stub>
9393
</td>
9494
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-shrink oc-td oc-table-data-cell oc-table-data-cell-icon"><span class="oc-icon oc-icon-m oc-icon-passive"><!----></span></td>
9595
<td class="oc-table-cell oc-table-cell-align-left oc-table-cell-align-middle oc-table-cell-width-auto oc-td oc-table-data-cell oc-table-data-cell-name mark-element"><span class="spaces-table-space-name" data-test-space-name="2 Another space">2 Another space</span></td>

0 commit comments

Comments
 (0)