Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix 2160 create accessible ckeckboxes for media #2208

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

17 changes: 11 additions & 6 deletions src/components/File.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,9 @@

<NcCheckboxRadioSwitch v-if="allowSelection"
class="selection-checkbox"
:aria-label="t('photos', 'Select image {imageName}', {imageName: file.basename})"
:checked="selected"
@update:checked="onToggle">
<span class="input-label">{{ t('photos', 'Select image {imageName}', {imageName: file.basename}) }}</span>
</NcCheckboxRadioSwitch>
@update:checked="onToggle" />

<FavoriteIcon v-if="file.favorite === 1"
v-once
Expand Down Expand Up @@ -333,15 +332,21 @@ export default {
z-index: 1;
width: fit-content;

// Make the checkbox background round on hover.
:deep .checkbox-radio-switch__label {
:deep .checkbox-radio-switch__input:focus-visible + .checkbox-radio-switch__content,
.checkbox-radio-switch__input:focus-visible {
outline: 2px solid var(--color-main-text);
box-shadow: 0 0 0 3px var(--color-main-background);
outline-offset: 0px;
}

:deep .checkbox-radio-switch__content {
padding: 10px;
box-sizing: border-box;
background: var(--color-main-background);

// Add a background to the checkbox so we do not see the image through it.
&::after {
content: '';
background: var(--color-primary-element-light);
width: 16px;
height: 16px;
position: absolute;
Expand Down
Loading