Skip to content

Commit

Permalink
Merge pull request #2275 from nextcloud/fix/41900-fix-description-for…
Browse files Browse the repository at this point in the history
…-favorite-images

fix(files): Fix description for favorite images and remove image description
  • Loading branch information
susnux authored Jan 23, 2024
2 parents 48b3e4a + 6360bda commit b37af9e
Show file tree
Hide file tree
Showing 21 changed files with 33 additions and 39 deletions.
4 changes: 2 additions & 2 deletions js/photos-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-main.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-public.js.map

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/photos-src_views_FaceContent_vue.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/photos-src_views_FaceContent_vue.js.map

Large diffs are not rendered by default.

12 changes: 3 additions & 9 deletions src/components/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
:key="`${file.basename}-small`"
:src="srcSmall"
:alt="file.basename"
:aria-describedby="ariaDescription"
:decoding="loadedSmall || isVisible ? 'sync' : 'async'"
:fetchpriority="loadedSmall || isVisible ? 'high' : 'low'"
:loading="loadedSmall || isVisible ? 'eager' : distance < 2 ? 'auto' : 'lazy'"
Expand All @@ -61,14 +60,10 @@
:decoding="loadedLarge || isVisible ? 'sync' : 'async'"
:fetchpriority="loadedLarge || isVisible ? 'high' : 'low'"
:loading="loadedLarge || isVisible ? 'auto' : 'lazy'"
:aria-describedby="ariaDescription"
@load="onLoadLarge"
@error="onErrorLarge">
</template>
</div>

<!-- image description -->
<p :id="ariaDescription" class="file__hidden-description" :class="{show: errorSmall && errorLarge}">{{ file.basename }}</p>
</a>

<NcCheckboxRadioSwitch v-if="allowSelection"
Expand Down Expand Up @@ -133,12 +128,11 @@ export default {
},

computed: {
/** @return {string} */
ariaDescription() {
return `image-description-${this.file.fileid}`
},
/** @return {string} */
ariaLabel() {
if (this.file.favorite) {
return t('photos', 'Favorite image, open the full size "{name}" image', { name: this.file.basename })
}
return t('photos', 'Open the full size "{name}" image', { name: this.file.basename })
},
/** @return {boolean} */
Expand Down

0 comments on commit b37af9e

Please sign in to comment.