mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(settings): hide list of webauthn devices if empty
- resolves https://github.com/nextcloud/server/issues/59339 If there are no devices the list would be empty. This is invalid for accessibility, as every list needs at least one listitem. Ref: https://www.w3.org/TR/wai-aria-1.2/#mustContain Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
13583e8c6b
commit
b060efaca4
1 changed files with 13 additions and 11 deletions
|
|
@ -9,20 +9,22 @@
|
|||
<p class="settings-hint hidden-when-empty">
|
||||
{{ t('settings', 'Set up your account for passwordless authentication following the FIDO2 standard.') }}
|
||||
</p>
|
||||
|
||||
<NcNoteCard v-if="devices.length === 0" type="info">
|
||||
{{ t('settings', 'No devices configured.') }}
|
||||
</NcNoteCard>
|
||||
|
||||
<h3 v-else id="security-webauthn__active-devices">
|
||||
{{ t('settings', 'The following devices are configured for your account:') }}
|
||||
</h3>
|
||||
<ul aria-labelledby="security-webauthn__active-devices" class="security-webauthn__device-list">
|
||||
<WebAuthnDevice
|
||||
v-for="device in sortedDevices"
|
||||
:key="device.id"
|
||||
:name="device.name"
|
||||
@delete="deleteDevice(device.id)" />
|
||||
</ul>
|
||||
<template v-else>
|
||||
<h3 id="security-webauthn__active-devices">
|
||||
{{ t('settings', 'The following devices are configured for your account:') }}
|
||||
</h3>
|
||||
<ul aria-labelledby="security-webauthn__active-devices" class="security-webauthn__device-list">
|
||||
<WebAuthnDevice
|
||||
v-for="device in sortedDevices"
|
||||
:key="device.id"
|
||||
:name="device.name"
|
||||
@delete="deleteDevice(device.id)" />
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<NcNoteCard v-if="!supportsWebauthn" type="warning">
|
||||
{{ t('settings', 'Your browser does not support WebAuthn.') }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue