Skip to content

Commit 6bc6ed9

Browse files
authored
Merge pull request #54172 from nextcloud/fix/app-icon-aria
2 parents 5108b8f + 4af6586 commit 6bc6ed9

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

core/src/components/AppMenuIcon.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,25 @@
1414
</template>
1515

1616
<script setup lang="ts">
17-
import type { INavigationEntry } from '../types/navigation'
17+
import type { INavigationEntry } from '../types/navigation.ts'
18+
1819
import { n } from '@nextcloud/l10n'
1920
import { computed } from 'vue'
20-
2121
import IconDot from 'vue-material-design-icons/CircleOutline.vue'
2222
2323
const props = defineProps<{
2424
app: INavigationEntry
2525
}>()
2626
27-
const ariaHidden = computed(() => String(props.app.unread > 0))
27+
// only hide if there are no unread notifications
28+
const ariaHidden = computed(() => !props.app.unread ? 'true' : undefined)
2829
2930
const ariaLabel = computed(() => {
30-
if (ariaHidden.value === 'true') {
31-
return ''
31+
if (!props.app.unread) {
32+
return undefined
3233
}
33-
return props.app.name
34-
+ (props.app.unread > 0 ? ` (${n('core', '{count} notification', '{count} notifications', props.app.unread, { count: props.app.unread })})` : '')
34+
35+
return `${props.app.name} (${n('core', '{count} notification', '{count} notifications', props.app.unread, { count: props.app.unread })})`
3536
})
3637
</script>
3738

dist/core-main.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/core-main.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)