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

fix: tiles view tab navigation (a11y) #9670

Merged
merged 2 commits into from
Sep 13, 2023
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-tiles-view-accessibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Tiles view accessibility

Navigating via tab and enter in the tiles view has been fixed.

https://github.com/owncloud/web/pull/9670
https://github.com/owncloud/web/issues/9633
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
:class="classes"
:value="option"
:disabled="disabled"
@keydown.enter="$emit('click', $event)"
/>
<label :for="id" :class="labelClasses" v-text="label" />
</span>
Expand Down Expand Up @@ -176,6 +177,10 @@ export default defineComponent({
cursor: pointer;
}

&:focus-visible {
outline: var(--oc-color-swatch-primary-default) auto 1px;
}

&-checked,
:checked,
&:indeterminate {
Expand Down
1 change: 1 addition & 0 deletions packages/design-system/src/components/OcTile/OcTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm"
:resource="resource"
:folder-link="resourceRoute"
tabindex="-1"
@click="$emit('click')"
>
<div class="oc-tile-card-selection">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`OcTile component renders default space correctly 1`] = `
<div class="oc-tile-card oc-card oc-card-default oc-rounded">
<oc-resource-link-stub class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" isresourceclickable="true" resource="[object Object]">
<oc-resource-link-stub class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" isresourceclickable="true" resource="[object Object]" tabindex="-1">
<div class="oc-tile-card-selection"></div>
<!--v-if-->
<div class="oc-tile-card-preview oc-flex oc-flex-middle oc-flex-center">
Expand All @@ -27,7 +27,7 @@ exports[`OcTile component renders default space correctly 1`] = `

exports[`OcTile component renders disabled space correctly 1`] = `
<div class="oc-tile-card oc-card oc-card-default oc-rounded state-trashed">
<oc-resource-link-stub class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" isresourceclickable="true" resource="[object Object]">
<oc-resource-link-stub class="oc-card-media-top oc-flex oc-flex-center oc-flex-middle oc-m-rm" isresourceclickable="true" resource="[object Object]" tabindex="-1">
<div class="oc-tile-card-selection"></div>
<oc-tag-stub class="resource-disabled-indicator oc-position-absolute" rounded="false" size="medium" type="span">
<span>Disabled</span>
Expand Down