Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:aria-label="labelHidden ? label : null"
@keydown.enter="keydownEnter"
/>
<label v-if="!labelHidden" :for="id" :class="labelClasses" v-text="label" />
<label v-if="!labelHidden" :for="id" :class="computedLabelClasses" v-text="label" />
</span>
</template>

Expand Down Expand Up @@ -69,6 +69,7 @@ interface Props {
option?: unknown
label?: string
labelHidden?: boolean
labelClasses?: string[]
size?: 'small' | 'medium' | 'large'
}
interface Emits {
Expand All @@ -89,7 +90,8 @@ const {
label = null,
labelHidden = false,
size = 'medium',
modelValue = false
modelValue = false,
labelClasses = []
} = defineProps<Props>()

const emit = defineEmits<Emits>()
Expand All @@ -114,7 +116,7 @@ const classes = computed(() => {
]
})

const labelClasses = computed(() => ({ 'oc-cursor-pointer': !disabled }))
const computedLabelClasses = computed(() => [{ 'oc-cursor-pointer': !disabled }, ...labelClasses])

const isChecked = computed(() => {
if (Array.isArray(model.value)) {
Expand Down
3 changes: 2 additions & 1 deletion packages/design-system/src/components/OcDrop/OcDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ function initializeTippy() {
} as Modifier<'fixVerticalPosition', unknown>
]
},
content
content,
role: 'listbox'
}

if (unref(target)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`OcDrop > tippy > renders tippy 1`] = `
data-reference-hidden=""
data-state="visible"
data-theme="none"
role="tooltip"
role="listbox"
style="max-width: 416px; transition-duration: 300ms;"
tabindex="-1"
>
Expand Down Expand Up @@ -73,7 +73,7 @@ exports[`OcDrop > tippy > renders tippy 2`] = `
data-reference-hidden=""
data-state="hidden"
data-theme="none"
role="tooltip"
role="listbox"
style="max-width: 416px; transition-duration: 250ms;"
tabindex="-1"
>
Expand Down Expand Up @@ -125,7 +125,7 @@ exports[`OcDrop > tippy > renders tippy 3`] = `
data-reference-hidden=""
data-state="visible"
data-theme="none"
role="tooltip"
role="listbox"
style="max-width: 416px; transition-duration: 300ms;"
tabindex="-1"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
<div class="oc-width-expand oc-position-relative">
<input
ref="searchInput"
role="combobox"
aria-autocomplete="list"
:aria-expanded="ariaExpanded"
:aria-controls="ariaControls"
:class="inputClass"
:aria-label="label"
:value="searchQuery"
Expand Down Expand Up @@ -83,6 +87,8 @@ import { useGettext } from 'vue3-gettext'
* @prop {string} [placeholder=''] - Placeholder text for the input field.
* @prop {string} [label=''] - Aria-label for the input field.
* @prop {boolean} [small=false] - Whether the search bar should be smaller in size.
* @prop {string} [ariaExpanded='false'] - Indicates if the dropdown is expanded (for combobox).
* @prop {string} [ariaControls=''] - ID of the dropdown element controlled by this input.
* @prop {string} [buttonLabel='Search'] - Label for the search button.
* @prop {boolean} [buttonHidden=false] - Whether to hide the search button visually.
* @prop {boolean} [typeAhead=false] - If true, triggers the search event on each character input.
Expand Down Expand Up @@ -142,6 +148,8 @@ interface Props {
cancelButtonVariation?: 'passive' | 'primary' | 'danger' | 'success' | 'warning' | 'brand'
cancelButtonAppearance?: 'outline' | 'filled' | 'raw' | 'raw-inverse'
cancelHandler?: () => void
ariaExpanded?: string
ariaControls?: string
}

interface Emits {
Expand Down Expand Up @@ -172,7 +180,9 @@ const {
showCancelButton = false,
cancelButtonVariation = 'primary',
cancelButtonAppearance = 'raw',
cancelHandler = () => {}
cancelHandler = () => {},
ariaExpanded = 'false',
ariaControls = ''
} = defineProps<Props>()
const emit = defineEmits<Emits>()
const slots = useSlots()
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/src/tokens/ods/font.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ font:
default:
value: 0.875rem
xsmall:
value: 0.72rem
value: 0.80rem
small:
value: 0.86rem
medium:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<div class="logo-wrapper">
<img alt="" :src="currentTheme.logo.topbar" class="oc-p-xs" />
</div>
<label for="logo-upload-input" class="oc-invisible-sr">
{{ $pgettext('Accesibility label to change logo', 'Change logo') }}
</label>
<input
id="logo-upload-input"
ref="logoInput"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
class="oc-ml-s"
:label="$gettext('Select all users')"
:model-value="allUsersSelected"
:label-hidden="true"
:label-hidden="false"
:label-classes="['oc-invisible-sr']"
@update:model-value="
allUsersSelected ? unselectAllUsers() : selectUsers(paginatedItems)
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
<thead class="oc-thead">
<tr class="oc-table-header-row">
<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;">
<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>
<div><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>
</th>
<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;">
<div><span class="oc-table-thead-content header-text"></span></div>
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
<tbody class="has-item-context-menu">
<tr class="oc-tbody-tr oc-tbody-tr-1" data-item-id="1" draggable="false">
<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">
<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>
<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>
</td>
<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>
<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>
Expand Down Expand Up @@ -89,7 +89,7 @@ exports[`SpacesList > should render all spaces in a table 1`] = `
</tr>
<tr class="oc-tbody-tr oc-tbody-tr-2" data-item-id="2" draggable="false">
<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">
<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>
<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>
</td>
<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>
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ exports[`Users view > list view > renders list initially 1`] = `
<thead class="oc-thead">
<tr class="oc-table-header-row">
<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;">
<div><span class="oc-table-thead-content"><!-- TODO: check whether we really need the click here --> <!-- eslint-disable vuejs-accessibility/no-static-element-interactions --> <!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events --> <span><!-- eslint-enable vuejs-accessibility/no-static-element-interactions --> <input id="oc-checkbox-1" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l" aria-label="Select all users"> <!--v-if--></span></span></div>
<div><span class="oc-table-thead-content"><!-- TODO: check whether we really need the click here --> <!-- eslint-disable vuejs-accessibility/no-static-element-interactions --> <!-- eslint-disable-next-line vuejs-accessibility/click-events-have-key-events --> <span><!-- eslint-enable vuejs-accessibility/no-static-element-interactions --> <input id="oc-checkbox-1" type="checkbox" name="checkbox" class="oc-checkbox oc-rounded oc-checkbox-l"> <label for="oc-checkbox-1" class="oc-cursor-pointer oc-invisible-sr">Select all users</label></span></span></div>
</th>
<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-avatar" style="top: 0px;">
<div><span class="oc-table-thead-content header-text"></span></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<span>{{ app.badge.label }}</span>
</div>
<div class="app-image">
<oc-img v-if="currentImage?.url" :src="currentImage?.url" />
<oc-img v-if="currentImage?.url" :src="currentImage?.url" :alt="app.name" />
<div v-else class="fallback-icon">
<oc-icon name="computer" size="xxlarge" />
</div>
Expand Down
3 changes: 2 additions & 1 deletion packages/web-app-app-store/src/components/AppTags.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
v-for="tag in app.tags"
:key="`app-tag-${app.id}-${tag}`"
data-testid="tag-button"
size="small"
size="medium"
class="oc-text-nowrap"
type="button"
@click="emitClick(tag)"
Expand Down Expand Up @@ -33,5 +33,6 @@ const emitClick = (tagName: string) => {
.app-tags {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
}
</style>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<div>
<label class="oc-invisible-sr" for="space-image-upload-input">
{{ $pgettext('Accesibility label to upload a space image', 'Upload space image') }}
</label>
<input
id="space-image-upload-input"
ref="spaceImageInput"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<template>
<div>
<context-action-menu :menu-sections="menuSections" :action-options="actionOptions" />
<label class="oc-invisible-sr" for="space-image-upload-input">
{{
$pgettext(
'Accesibility label to upload a space image in the space context actions',
'Upload space image'
)
}}
</label>
<input
id="space-image-upload-input"
ref="spaceImageInput"
Expand Down
17 changes: 17 additions & 0 deletions packages/web-app-files/src/components/Spaces/SpaceHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
:class="{ 'space-header-image-expanded': imageExpanded || isMobileWidth }"
>
<button v-if="imageContent" class="btn-toggle-image" @click="toggleImageExpanded">
<label class="oc-invisible-sr" for="btn-toggle-image">
{{
imageExpanded
? $pgettext(
'Accessibility label to inform user when space image has been collapsed by being clicked on',
'Collapse space image'
)
: $pgettext(
'Accessibility label to inform user when space image has been expanded by being clicked on',
'Expand space image'
)
}}
</label>
<img alt="" :src="imageContent" />
</button>
<div v-else class="space-header-image-default oc-flex oc-flex-middle oc-flex-center">
Expand Down Expand Up @@ -56,6 +69,7 @@
class="markdown-container oc-flex oc-flex-middle"
>
<text-editor is-read-only :current-content="markdownContent" />

<div class="markdown-container-edit oc-ml-s">
<router-link
v-oc-tooltip="$gettext('Edit description')"
Expand All @@ -64,6 +78,9 @@
:to="editReadMeContentLink"
>
<oc-icon name="pencil" size="small" fill-type="line" />
<span class="oc-invisible-sr">
{{ $gettext('Edit description') }}
</span>
</router-link>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<template>
<oc-button id="context-menu-trigger-whitespace" aria-hidden appearance="raw">
<label class="oc-invisible-sr" for="context-menu-trigger-whitespace">
{{ $pgettext('Accessibility label', 'Show context menu') }}
</label>
<oc-drop
drop-id="context-menu-drop-whitespace"
toggle="#context-menu-trigger-whitespace"
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/spaces/Projects.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
v-if="resource.thumbnail"
class="tile-preview"
:src="resource.thumbnail"
alt=""
:alt="resource.name"
/>
</template>
<template v-else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ exports[`SpaceHeader > space image > should show the default image if no other i

exports[`SpaceHeader > space image > should show the set image 1`] = `
"<div class="space-header oc-p-m oc-flex">
<div class="space-header-image"><button class="btn-toggle-image"><img alt="" src="blob:image"></button></div>
<div class="space-header-image"><button class="btn-toggle-image"><label class="oc-invisible-sr" for="btn-toggle-image">Expand space image</label> <img alt="" src="blob:image"></button></div>
<div class="space-header-infos">
<div class="oc-flex oc-mb-s oc-flex-middle oc-flex-between">
<div class="oc-flex oc-flex-middle space-header-infos-heading">
Expand Down
15 changes: 14 additions & 1 deletion packages/web-app-search/src/portals/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
class="oc-flex"
data-custom-key-bindings-disabled="true"
>
<span id="search-description" class="oc-invisible-sr">
{{
$pgettext(
'Accesibility label to inform user that search results will appear below the search bar if they exist',
'Results will appear if they exist.'
)
}}
</span>
<oc-search-bar
id="files-global-search-bar"
:label="searchLabel"
Expand All @@ -18,6 +26,9 @@
cancel-button-variation="brand"
cancel-button-appearance="raw-inverse"
:cancel-handler="cancelSearch"
:aria-expanded="showDrop && term ? 'true' : 'false'"
aria-controls="files-global-search-options"
aria-describedby="search-description"
@advanced-search="onKeyUpEnter"
@input="updateTerm"
@clear="onClear"
Expand Down Expand Up @@ -55,7 +66,7 @@
close-on-click
same-width-as-target
>
<oc-list class="oc-list-divider">
<oc-list role="listbox" class="oc-list-divider">
<li
v-if="loading"
class="loading spinner oc-flex oc-flex-center oc-flex-middle oc-text-muted"
Expand All @@ -80,6 +91,8 @@
<li
v-for="providerSearchResultValue in getSearchResultForProvider(provider).values"
:key="providerSearchResultValue.id"
role="option"
:aria-selected="isPreviewElementActive(providerSearchResultValue.id)"
:data-search-id="providerSearchResultValue.id"
:class="{
active: isPreviewElementActive(providerSearchResultValue.id)
Expand Down
1 change: 0 additions & 1 deletion packages/web-pkg/src/components/FilesList/ResourceName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ const htmlTitle = computed(() => {
if (isExtensionDisplayed) {
return `${unref(displayName)}${unref(displayExtension)}`
}

return unref(displayName)
})
</script>
Expand Down
9 changes: 8 additions & 1 deletion packages/web-pkg/src/components/FilesList/ResourceTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
size="large"
:label="selectAllCheckboxLabel"
:disabled="resources.length === disabledResources.length"
:label-hidden="true"
:label-hidden="false"
:label-classes="['oc-invisible-sr']"
:model-value="areAllResourcesSelected"
@click.stop="toggleSelectionAll"
/>
Expand Down Expand Up @@ -1054,6 +1055,12 @@ function getSharedWithAvatarItems(resource: Resource) {
height: 0 !important;
}

.remove-legend-styling {
margin: 0px;
padding: 0px;
border: 0;
}

.resource-table {
&-resource-cut {
opacity: 0.7;
Expand Down