Skip to content

Commit 83e4b94

Browse files
committed
feat: improve accessibility
1 parent c297895 commit 83e4b94

File tree

7 files changed

+21
-9
lines changed

7 files changed

+21
-9
lines changed

apps/extension/manifest.chrome.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Epic Zeit",
4-
"version": "1.3.0",
4+
"version": "1.3.1",
55
"author": "Filip Vitas",
66
"description": "Epic way to sync timezones among colleagues, friends, and family across the globe.",
77
"icons": {

apps/extension/manifest.firefox.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "Epic Zeit",
4-
"version": "1.3.0",
4+
"version": "1.3.1",
55
"author": "Filip Vitas",
66
"description": "Epic way to sync timezones among colleagues, friends, and family across the globe.",
77
"icons": {

apps/extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@epiczeit/extension",
33
"private": true,
4-
"version": "1.3.0",
4+
"version": "1.3.1",
55
"type": "module",
66
"keywords": [
77
"chrome",

apps/web/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@epiczeit/web",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"type": "module",
55
"keywords": [
66
"react",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "epiczeit",
3-
"version": "1.3.0",
3+
"version": "1.3.1",
44
"private": true,
55
"type": "module",
66
"keywords": [

packages/ui/src/components/LocationLabelWithDialog.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function LocationLabelWithDialog({ location }) {
3535

3636
return (
3737
<Dialog open={isOpen} onOpenChange={open => setIsOpen(open)}>
38-
<DialogTrigger asChild>
38+
<DialogTrigger>
3939
<div className="overflow-hidden truncate cursor-pointer">{location.label}</div>
4040
</DialogTrigger>
4141

packages/ui/src/components/Timezone.jsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ export function Timezone({ currentTime, timezone }) {
137137
currentTime,
138138
)
139139

140+
function deleteTimezone() {
141+
actions.deleteTimezone(timezone)
142+
}
143+
144+
function deleteTimezoneOnKeyDown(event) {
145+
if (event.code === 'Enter' || event.code === 'Space') {
146+
actions.deleteTimezone(timezone)
147+
}
148+
}
149+
140150
useEffect(() => {
141151
$('.clockpicker-' + timezone.offset).clockpicker({
142152
twelvehour: !show24h,
@@ -165,7 +175,7 @@ export function Timezone({ currentTime, timezone }) {
165175
}}
166176
className="text-center px-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-primary">
167177
<div className={'inline-block ' + 'clockpicker-' + timezone.offset}>
168-
<label htmlFor={`time-${timezone.offset}`} className="flex flex-wrap justify-center">
178+
<label htmlFor={`time-${timezone.offset}`} className="flex flex-wrap justify-center cursor-pointer">
169179
<span className={showBoldHour ? 'font-semibold' : ''}>{hours}</span>
170180
<span>:</span>
171181
<span>
@@ -212,11 +222,13 @@ export function Timezone({ currentTime, timezone }) {
212222
</ul>
213223
</div>
214224

215-
<div className="absolute bottom-20 left-1/2 translate-x-[-50%] translate-y-[-20%] flex flex-col gap-4 invisible group-hover:visible">
225+
<div className="absolute bottom-20 left-1/2 translate-x-[-50%] translate-y-[-20%] flex flex-col gap-4 invisible group-hover:visible group-focus-within:visible">
216226
<IconTrash
217227
stroke={1.5}
218228
className="cursor-pointer"
219-
onClick={() => actions.deleteTimezone(timezone)}
229+
onClick={deleteTimezone}
230+
onKeyDown={deleteTimezoneOnKeyDown}
231+
tabIndex={0}
220232
title="Delete timezone"
221233
/>
222234
</div>

0 commit comments

Comments
 (0)