Merge pull request #33128 from nextcloud/enh/a11y-set-expanded-sharing

Add expanded attribute to button for listing others with access
This commit is contained in:
Pytal 2022-07-07 11:10:21 -07:00 committed by GitHub
commit a0681cc92f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 5 deletions

View file

@ -29,7 +29,10 @@
{{ subtitle }}
</p>
</div>
<Actions v-if="$slots['default']" menu-align="right" class="sharing-entry__actions">
<Actions v-if="$slots['default']"
class="sharing-entry__actions"
menu-align="right"
:aria-expanded="ariaExpandedValue">
<slot />
</Actions>
</li>
@ -68,8 +71,20 @@ export default {
type: Boolean,
default: true,
},
ariaExpanded: {
type: Boolean,
default: null,
},
},
computed: {
ariaExpandedValue() {
if (this.ariaExpanded === null) {
return this.ariaExpanded
}
return this.ariaExpanded ? 'true' : 'false'
},
},
}
</script>

View file

@ -25,7 +25,8 @@
<!-- Main collapsible entry -->
<SharingEntrySimple class="sharing-entry__inherited"
:title="mainTitle"
:subtitle="subTitle">
:subtitle="subTitle"
:aria-expanded="showInheritedShares">
<template #avatar>
<div class="avatar-shared icon-more-white" />
</template>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long