Improve beta menu nav accessibility (#762)

* Add ARIA labels to beta menu btns without text

* Adjust test locator
This commit is contained in:
bymyself
2024-09-08 17:49:43 -07:00
committed by GitHub
parent 616e295262
commit 21c3883cc7
4 changed files with 28 additions and 5 deletions

View File

@@ -171,7 +171,9 @@ test.describe('Menu', () => {
const tab = comfyPage.menu.nodeLibraryTab
await tab.getFolder('foo').click({ button: 'right' })
await comfyPage.page.getByLabel('Rename').click()
await comfyPage.page
.locator('.p-contextmenu-item-label:has-text("Rename")')
.click()
await comfyPage.page.keyboard.insertText('bar')
await comfyPage.page.keyboard.press('Enter')
@@ -291,7 +293,9 @@ test.describe('Menu', () => {
})
const tab = comfyPage.menu.nodeLibraryTab
await tab.getFolder('foo').click({ button: 'right' })
await comfyPage.page.getByLabel('Rename').click()
await comfyPage.page
.locator('.p-contextmenu-item-label:has-text("Rename")')
.click()
await comfyPage.page.keyboard.insertText('bar')
await comfyPage.page.keyboard.press('Enter')
await comfyPage.nextFrame()