Skip to content

Commit fad7234

Browse files
Merge pull request #43112 from nextcloud/backport/43098/stable28
[stable28] fix(settings): federation scope menu a11y
2 parents 0f6b626 + 453fa74 commit fad7234

File tree

4 files changed

+22
-113
lines changed

4 files changed

+22
-113
lines changed

apps/settings/src/components/PersonalInfo/shared/FederationControl.vue

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,31 @@
2121
-->
2222

2323
<template>
24-
<NcActions :class="{ 'federation-actions': !additional, 'federation-actions--additional': additional }"
24+
<NcActions class="federation-actions"
25+
:class="{ 'federation-actions--additional': additional }"
2526
:aria-label="ariaLabel"
2627
:default-icon="scopeIcon"
2728
:disabled="disabled">
28-
<FederationControlAction v-for="federationScope in federationScopes"
29+
<NcActionButton v-for="federationScope in federationScopes"
2930
:key="federationScope.name"
30-
:active-scope="scope"
31-
:display-name="federationScope.displayName"
32-
:handle-scope-change="changeScope"
33-
:icon-class="federationScope.iconClass"
34-
:is-supported-scope="supportedScopes.includes(federationScope.name)"
35-
:name="federationScope.name"
36-
:tooltip-disabled="federationScope.tooltipDisabled"
37-
:tooltip="federationScope.tooltip" />
31+
:close-after-click="true"
32+
:disabled="!supportedScopes.includes(federationScope.name)"
33+
:icon="federationScope.iconClass"
34+
:name="federationScope.displayName"
35+
type="radio"
36+
:value="federationScope.name"
37+
:model-value="scope"
38+
@update:modelValue="changeScope">
39+
{{ supportedScopes.includes(federationScope.name) ? federationScope.tooltip : federationScope.tooltipDisabled }}
40+
</NcActionButton>
3841
</NcActions>
3942
</template>
4043

4144
<script>
4245
import NcActions from '@nextcloud/vue/dist/Components/NcActions.js'
46+
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
4347
import { loadState } from '@nextcloud/initial-state'
4448
45-
import FederationControlAction from './FederationControlAction.vue'
46-
4749
import {
4850
ACCOUNT_PROPERTY_READABLE_ENUM,
4951
ACCOUNT_SETTING_PROPERTY_READABLE_ENUM,
@@ -66,7 +68,7 @@ export default {
6668
6769
components: {
6870
NcActions,
69-
FederationControlAction,
71+
NcActionButton,
7072
},
7173
7274
props: {
@@ -194,14 +196,15 @@ export default {
194196
</script>
195197
196198
<style lang="scss" scoped>
197-
.federation-actions--additional {
198-
&::v-deep button {
199+
.federation-actions {
200+
&--additional {
201+
&:deep(button) {
199202
// TODO remove this hack
200-
padding-bottom: 7px;
201203
height: 30px !important;
202204
min-height: 30px !important;
203205
width: 30px !important;
204206
min-width: 30px !important;
205207
}
206208
}
209+
}
207210
</style>

apps/settings/src/components/PersonalInfo/shared/FederationControlAction.vue

Lines changed: 0 additions & 94 deletions
This file was deleted.

dist/settings-vue-settings-personal-info.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-info.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)