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

Unique indicators & accessible descriptions for sharing indicators #5182

Merged
merged 1 commit into from
Jun 1, 2021
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
7 changes: 7 additions & 0 deletions changelog/unreleased/enhancement-accessible-status-indicators
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Enhancement: Accessible status indicators

To make both the clickable (button) and the visible (icon) part of the
status indicators in the files table accessible, we have added a description,
in addition to the tooltip and `aria-label`.

https://github.com/owncloud/web/pull/5182
2 changes: 1 addition & 1 deletion changelog/unreleased/enhancement-bump-ods-version
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Enhancement: Update owncloud Design System to v6.4.0
Enhancement: Update owncloud Design System to v7.0.0

- Lots of updates regarding accessibility topics
- Removal of home icon in breadcrumbs, changed to "All files" link as breadcrumb root
Expand Down
24 changes: 14 additions & 10 deletions packages/web-app-files/src/helpers/statusIndicators.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ const isLinkShare = (resource, sharesTree) => {
return isDirectLinkShare(resource) || isIndirectLinkShare(resource, sharesTree)
}

const shareUserIconLabel = resource => {
const shareUserIconDescribedBy = resource => {
return isDirectUserShare(resource)
? $gettext('Directly shared with people')
: $gettext('Shared with people through one of the parent folders')
? $gettext('This item is directly shared with others.')
: $gettext('This item is shared with others through one of the parent folders.')
}

const shareLinkIconLabel = resource => {
const shareLinkDescribedBy = resource => {
return isDirectLinkShare(resource)
? $gettext('Directly shared with links')
: $gettext('Shared with links through one of the parent folders')
? $gettext('This item is directly shared via links.')
: $gettext('This item is shared via links through one of the parent folders.')
}

const shareTypesIndirect = (path, sharesTree) => {
Expand Down Expand Up @@ -86,17 +86,21 @@ const shareTypesIndirect = (path, sharesTree) => {
export const getIndicators = (resource, sharesTree) => {
const indicators = [
{
id: 'files-sharing',
label: shareUserIconLabel(resource, sharesTree),
id: `files-sharing-${resource.id.replaceAll('=','')}`,
accessibleDescription: shareUserIconDescribedBy(resource, sharesTree),
label: $gettext('Show invited people'),
visible: isUserShare(resource, sharesTree),
icon: 'group',
target: 'files-sharing',
handler: indicatorHandler
},
{
id: 'file-link',
label: shareLinkIconLabel(resource, sharesTree),
id: `file-link-${resource.id.replaceAll('=','')}`,
accessibleDescription: shareLinkDescribedBy(resource, sharesTree),
label: $gettext('Show links'),
visible: isLinkShare(resource, sharesTree),
icon: 'link',
target: 'file-link',
handler: indicatorHandler
}
]
Expand Down