Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

fix(desktop): mark steps read from the macOS accessibility tree as ax

Luis Ortizefbdd7ea27e3
diff --git a/apps/desktop/scripts/check-pipeline.ts b/apps/desktop/scripts/check-pipeline.ts
index e4c058b..b5f6ad4 100644
--- a/apps/desktop/scripts/check-pipeline.ts
+++ b/apps/desktop/scripts/check-pipeline.ts
@@ -334,7 +334,7 @@ app.whenReady().then(async () => {
results.push({
name: 'accessibility metadata reaches the step',
ok:
- meta?.source === 'uia' &&
+ meta?.source === (MAC ? 'ax' : 'uia') &&
meta.ariaLabel === 'Save' &&
meta.name === 'SaveButton' &&
meta.role === 'button' &&
diff --git a/apps/desktop/src/main/capture/recorder.ts b/apps/desktop/src/main/capture/recorder.ts
index cd8b9b8..f9d7a8d 100644
--- a/apps/desktop/src/main/capture/recorder.ts
+++ b/apps/desktop/src/main/capture/recorder.ts
@@ -601,7 +601,7 @@ export class DesktopRecorder {
await this.send({
action,
elementMeta: {
- source: target ? 'uia' : 'screen',
+ source: target ? (process.platform === 'darwin' ? 'ax' : 'uia') : 'screen',
textContent: target?.textContent ?? null,
ariaLabel: target?.ariaLabel ?? null,
placeholder: null,