Procházet zdrojové kódy

fix(app): restore model variant accessibility (#37857)

Co-authored-by: Aiden Cline <rekram1-node@users.noreply.github.com>
opencode-agent[bot] před 1 měsícem
rodič
revize
5586f9675e

+ 1 - 1
packages/app/e2e/regression/prompt-thinking-level.spec.ts

@@ -56,7 +56,7 @@ test("shows the V2 thinking level control while relevant", async ({ page }) => {
   await page.goto(`/${base64Encode(directory)}/session/${sessionID}`)
   const composer = page.locator('[data-component="prompt-input-v2"]')
   const input = composer.locator('[data-component="prompt-input"]')
-  const control = composer.locator('button[title="Choose model variant"]')
+  const control = composer.getByRole("button", { name: "Choose model variant" })
   await expectAppVisible(composer)
 
   await idleComposer(page)

+ 1 - 0
packages/session-ui/src/v2/components/prompt-input/index.tsx

@@ -557,6 +557,7 @@ export function PromptInputV2Select(props: {
           variant="ghost-muted"
           size="normal"
           class={`max-w-[220px] justify-start ![font-weight:440] ${props.class ?? ""}`}
+          aria-label={props.title}
         >
           {props.currentIcon}
           <span class="truncate capitalize leading-5">