aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-10-18 02:16:41 +0200
committerGitHub <noreply@github.com>2023-10-18 02:16:41 +0200
commit54d1ec58bf432df9b9c65583dfb0e207022d5076 (patch)
tree3078be64f330b9ae2767f93ade319cb1472da499 /apps
parentff76e258c882861b265d9e3ff8324d7946da99f7 (diff)
parent8d57cdcab5969e569faa8bb519442b91a43102bd (diff)
downloadnextcloud-server-54d1ec58bf432df9b9c65583dfb0e207022d5076.tar.gz
nextcloud-server-54d1ec58bf432df9b9c65583dfb0e207022d5076.zip
Merge pull request #40950 from nextcloud/fix/add-aria-pressed-to-buttons
fix(theming): Add `aria-pressed` attribute to active background
Diffstat (limited to 'apps')
-rw-r--r--apps/theming/src/UserThemes.vue6
-rw-r--r--apps/theming/src/components/BackgroundSettings.vue31
2 files changed, 27 insertions, 10 deletions
diff --git a/apps/theming/src/UserThemes.vue b/apps/theming/src/UserThemes.vue
index eb2c4d19547..be76f02563d 100644
--- a/apps/theming/src/UserThemes.vue
+++ b/apps/theming/src/UserThemes.vue
@@ -26,7 +26,9 @@
<NcSettingsSection :name="t('theming', 'Appearance and accessibility')"
:limit-width="false"
class="theming">
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p v-html="description" />
+ <!-- eslint-disable-next-line vue/no-v-html -->
<p v-html="descriptionDetail" />
<div class="theming__preview-list">
@@ -133,7 +135,7 @@ export default {
// using the `t` replace method escape html, we have to do it manually :/
return t(
'theming',
- 'Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.'
+ 'Universal access is very important to us. We follow web standards and check to make everything usable also without mouse, and assistive software such as screenreaders. We aim to be compliant with the {guidelines}Web Content Accessibility Guidelines{linkend} 2.1 on AA level, with the high contrast theme even on AAA level.',
)
.replace('{guidelines}', this.guidelinesLink)
.replace('{linkend}', '</a>')
@@ -146,7 +148,7 @@ export default {
descriptionDetail() {
return t(
'theming',
- 'If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!'
+ 'If you find any issues, do not hesitate to report them on {issuetracker}our issue tracker{linkend}. And if you want to get involved, come join {designteam}our design team{linkend}!',
)
.replace('{issuetracker}', this.issuetrackerLink)
.replace('{designteam}', this.designteamLink)
diff --git a/apps/theming/src/components/BackgroundSettings.vue b/apps/theming/src/components/BackgroundSettings.vue
index 830d25bf956..d12489b0587 100644
--- a/apps/theming/src/components/BackgroundSettings.vue
+++ b/apps/theming/src/components/BackgroundSettings.vue
@@ -26,8 +26,12 @@
<template>
<div class="background-selector" data-user-theming-background-settings>
<!-- Custom background -->
- <button class="background background__filepicker"
- :class="{ 'icon-loading': loading === 'custom', 'background--active': backgroundImage === 'custom' }"
+ <button :aria-pressed="backgroundImage === 'custom'"
+ :class="{
+ 'icon-loading': loading === 'custom',
+ 'background background__filepicker': true,
+ 'background--active': backgroundImage === 'custom'
+ }"
:data-color-bright="invertTextColor(Theming.color)"
data-user-theming-background-custom
tabindex="0"
@@ -38,8 +42,12 @@
</button>
<!-- Default background -->
- <button class="background background__default"
- :class="{ 'icon-loading': loading === 'default', 'background--active': backgroundImage === 'default' }"
+ <button :aria-pressed="backgroundImage === 'default'"
+ :class="{
+ 'icon-loading': loading === 'default',
+ 'background background__default': true,
+ 'background--active': backgroundImage === 'default'
+ }"
:data-color-bright="invertTextColor(Theming.defaultColor)"
:style="{ '--border-color': Theming.defaultColor }"
data-user-theming-background-default
@@ -62,8 +70,11 @@
</NcColorPicker>
<!-- Remove background -->
- <button class="background background__delete"
- :class="{ 'background--active': isBackgroundDisabled }"
+ <button :aria-pressed="isBackgroundDisabled"
+ :class="{
+ 'background background__delete': true,
+ 'background--active': isBackgroundDisabled
+ }"
data-user-theming-background-clear
tabindex="0"
@click="removeBackground">
@@ -77,11 +88,15 @@
:key="shippedBackground.name"
:title="shippedBackground.details.attribution"
:aria-label="shippedBackground.details.attribution"
- :class="{ 'icon-loading': loading === shippedBackground.name, 'background--active': backgroundImage === shippedBackground.name }"
+ :aria-pressed="backgroundImage === shippedBackground.name"
+ :class="{
+ 'background background__shipped': true,
+ 'icon-loading': loading === shippedBackground.name,
+ 'background--active': backgroundImage === shippedBackground.name
+ }"
:data-color-bright="shippedBackground.details.theming === 'dark'"
:data-user-theming-background-shipped="shippedBackground.name"
:style="{ backgroundImage: 'url(' + shippedBackground.preview + ')', '--border-color': shippedBackground.details.primary_color }"
- class="background background__shipped"
tabindex="0"
@click="setShipped(shippedBackground.name)">
<Check :size="44" />