- commit
- ac9625feb2ce38403366f5479e0486833e56723a
- parent
- 73084e69c56278b98438dc2121b53694da45d305
- author
- Dami <dami.etoile@gmail.com>
| M | src/ | 7 | ++++++- |
| M | tests/ | 7 | +++++-- |
@@ -461,7 +461,12 @@ export function createStage(options = {}) {
461461 reducedMotion,462462 coarsePointer: globalThis.matchMedia?.("(pointer: coarse)").matches ?? false,463463 });464- canvas.setAttribute("aria-label", `${worldCard.world.name || 'World'}: ${worldCard.world.tagline || ''} by ${worldCard.world.author || 'unknown author'}. Press Enter to enter.`.trim());464+ const cardDescription = [465+ worldCard.world.name || 'World',466+ worldCard.world.tagline,467+ worldCard.world.author ? `by ${worldCard.world.author}` : null,468+ ].filter(Boolean).join('. ');469+ canvas.setAttribute("aria-label", `${cardDescription}. Press Enter to enter.`);465470 }466471 } else if (scene === "pause") {467472 renderPauseScene(ctx, {@@ -73,6 +73,7 @@ try {
7373 await openIndex(page);7474 await page.waitForTimeout(360);7575 assert.match(await canvasLabel(page), /Miau Core/);76+ assert.doesNotMatch(await canvasLabel(page), /unknown author/i);7677 await page.screenshot({ path: `${screenshotDir}/d20-world-1-card.png` });7778 report('Title enters INDEX with the Core world card');7879 @@ -140,12 +141,14 @@ try {
140141 await openIndex(mobilePage);141142 await mobilePage.waitForTimeout(360);142143 await mobilePage.screenshot({ path: `${screenshotDir}/d20-world-card-mobile.png` });143- await mobilePage.touchscreen.tap(195, 620);144+ await mobilePage.touchscreen.tap(195, 559);144145 await mobilePage.waitForFunction(() => !document.querySelector('.stage-canvas')?.getAttribute('aria-label')?.includes('Press Enter to enter'));145146 assert.equal(await mobilePage.locator('.stage-shell').getAttribute('data-scene'), 'index');146147 await mobilePage.touchscreen.tap(337, 92);147148 await mobilePage.waitForFunction(() => document.querySelector('.stage-canvas')?.getAttribute('aria-label')?.includes('Crossword') && document.querySelector('.stage-canvas')?.getAttribute('aria-label')?.includes('Press Enter to enter'));148- await mobilePage.touchscreen.tap(195, 620);149+ await mobilePage.waitForTimeout(360);150+ await mobilePage.screenshot({ path: `${screenshotDir}/d20-world-2-card-mobile.png` });151+ await mobilePage.touchscreen.tap(195, 559);149152 await mobilePage.waitForFunction(() => !document.querySelector('.stage-canvas')?.getAttribute('aria-label')?.includes('Press Enter to enter'));150153 await mobilePage.touchscreen.tap(321, 827);151154 await waitScene(mobilePage, 'pause');