This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>My Neighbor Totoro</title> | |
| </head> | |
| <body> | |
| <div class="wrapper"> | |
| <header> | |
| <nav> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>My Neighbor Totoro Nesting Dolls</title> | |
| </head> | |
| <body> | |
| <ul> | |
| <li><a href="/">Ghibli Store</a></li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i big.mov -vcodec libx264 -preset veryfast small.mov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const baseUrl = "https://liptrot.org"; | |
| const sizes = [[600, 900]] | |
| const pages = [ | |
| {url:"/",name:"home"}, | |
| {url: "/guides", name:"guides"}, | |
| {url: "/posts/accessible-names/", name:"blog-accessible-names"} | |
| ] | |
| sizes.forEach((size) => { | |
| describe(`On ${size} screen`, () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test("should navigate to the input and announce the label and hint", async () => { | |
| document.body.innerHTML = ` | |
| <form> | |
| <label for="ref">What is your reference?</label> | |
| <div class="hint" id="ref-hint">This is 10 characters.</div> | |
| <input type="text" name="ref" id="ref" aria-describedby="ref-hint" /> | |
| <button>Save</button> | |
| </form> | |
| `; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test("I can navigate the tables page", async ({ page, voiceOver }) => { | |
| await page.goto("http://liptrot.org/guides/vo-macos/tables/", { | |
| waitUntil: "domcontentloaded", | |
| }); | |
| const header = await page.locator('header'); | |
| await expect(header).toBeVisible(); | |
| await voiceOver.interact(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // get button with accessible name of "login" and aria-expanded=false | |
| await page.getByRole('button', {name: "login", expanded: false}); | |
| // get h2 with accessible name of "conditions" | |
| await page.getByRole('heading', {level: 2, name: "Conditions"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test('open account menu actions', async ({ page }) => { | |
| const logInButton = page.getByRole('button', {name: 'login', expanded: false}); | |
| await logInButton.press('Enter'); | |
| const accountMenu = page.locator('#account-menu'); | |
| const accountMenuClose = page.locator('#account-menu-close') | |
| // check menu is visible | |
| await expect.soft(accountMenu).toBeVisible(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test('user can access carousel items', async ({ page }) => { | |
| const carouselPrev = page.getByRole('button', {name: 'previous'}); | |
| const firstDeal = page.getByTestId('first-deal-item'); | |
| carouselPrev.focus(); | |
| await page.keyboard.press('Tab'); | |
| await expect(firstDeal).toBeFocused(); | |
NewerOlder