Merge pull request #33480 from nextcloud/bugfix/noid/fix-workflow-engine-a11y

Fix workflow engine a11y and spacing of icons
This commit is contained in:
Joas Schilling 2022-08-08 22:06:57 +02:00 committed by GitHub
commit 79652a7e15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 38 additions and 12 deletions

View file

@ -58,4 +58,5 @@
--breakpoint-mobile: 1024px;
--primary-invert-if-bright: no;
--background-invert-if-dark: no;
--background-invert-if-bright: invert(100%);
}

View file

@ -91,6 +91,7 @@ class DarkTheme extends DefaultTheme implements ITheme {
'--color-border-dark' => $this->util->lighten($colorMainBackground, 14),
'--background-invert-if-dark' => 'invert(100%)',
'--background-invert-if-bright' => 'no',
]);
}
}

View file

@ -188,6 +188,7 @@ class DefaultTheme implements ITheme {
// other theme with media queries
'--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'no',
'--background-invert-if-dark' => 'no',
'--background-invert-if-bright' => 'invert(100%)',
];
// Register image variables only if custom-defined

View file

@ -32,12 +32,18 @@
@input="setValue">
<template slot="singleLabel" slot-scope="props">
<span v-if="props.option.icon" class="option__icon" :class="props.option.icon" />
<img v-else :src="props.option.iconUrl">
<img v-else
class="option__icon-img"
:src="props.option.iconUrl"
alt="">
<span class="option__title option__title_single">{{ props.option.label }}</span>
</template>
<template slot="option" slot-scope="props">
<span v-if="props.option.icon" class="option__icon" :class="props.option.icon" />
<img v-else :src="props.option.iconUrl">
<img v-else
class="option__icon-img"
:src="props.option.iconUrl"
alt="">
<span class="option__title">{{ props.option.label }}</span>
</template>
</Multiselect>
@ -137,7 +143,7 @@ export default {
},
}
</script>
<style scoped>
<style scoped lang="scss">
.multiselect, input[type='text'] {
width: 100%;
}
@ -148,4 +154,14 @@ export default {
overflow: hidden;
text-overflow: ellipsis;
}
.option__icon {
display: inline-block;
min-width: 30px;
background-position: left;
}
.option__icon-img {
margin-right: 14px;
}
</style>

View file

@ -136,8 +136,14 @@ export default {
},
}
</script>
<style scoped>
<style scoped lang="scss">
.multiselect, input[type='text'] {
width: 100%;
}
.option__icon {
display: inline-block;
min-width: 30px;
background-position: left;
}
</style>

View file

@ -1,7 +1,7 @@
<template>
<div class="event">
<div v-if="operation.isComplex && operation.fixedEntity !== ''" class="isComplex">
<img class="option__icon" :src="entity.icon">
<img class="option__icon" :src="entity.icon" alt="">
<span class="option__title option__title_single">{{ operation.triggerHint }}</span>
</div>
<Multiselect v-else
@ -14,12 +14,12 @@
@input="updateEvent">
<template slot="selection" slot-scope="{ values, isOpen }">
<div v-if="values.length && !isOpen" class="eventlist">
<img class="option__icon" :src="values[0].entity.icon">
<img class="option__icon" :src="values[0].entity.icon" alt="">
<span v-for="(value, index) in values" :key="value.id" class="text option__title option__title_single">{{ value.displayName }} <span v-if="index+1 < values.length">, </span></span>
</div>
</template>
<template slot="option" slot-scope="props">
<img class="option__icon" :src="props.option.entity.icon">
<img class="option__icon" :src="props.option.entity.icon" alt="">
<span class="option__title">{{ props.option.displayName }}</span>
</template>
</Multiselect>
@ -131,6 +131,7 @@ export default {
.option__icon {
width: 16px;
height: 16px;
filter: var(--background-invert-if-dark);
}
.eventlist img,

View file

@ -68,11 +68,11 @@ small {
margin: 0;
margin-right: 10px;
&:not(.icon-invert) {
filter: invert(1);
filter: var(--background-invert-if-bright);
}
}
}
.colored .icon-invert {
filter: invert(1);
filter: var(--background-invert-if-bright);
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long