fix(a11y): add aria-* entries to interface settings (#2799)
Co-authored-by: TAKAHASHI Shuuji <shuuji3@gmail.com>
This commit is contained in:
parent
8697cc44e4
commit
6bb9ad0511
5 changed files with 67 additions and 61 deletions
|
@ -27,12 +27,13 @@ const modes = [
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div flex="~ gap4 wrap" w-full>
|
||||
<div flex="~ gap4 wrap" w-full role="group" aria-labelledby="interface-cm">
|
||||
<button
|
||||
v-for="{ icon, label, mode } in modes"
|
||||
:key="mode"
|
||||
type="button"
|
||||
btn-text flex-1 flex="~ gap-1 center" p4 border="~ base rounded" bg-base ws-nowrap
|
||||
:tabindex="colorMode.preference === mode ? 0 : -1"
|
||||
:aria-pressed="colorMode.preference === mode ? 'true' : 'false'"
|
||||
:class="colorMode.preference === mode ? 'pointer-events-none' : 'filter-saturate-0'"
|
||||
@click="setColorMode(mode)"
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue