sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
76.8k stars 3.98k forks source link

Remove warning on button cannot have role separator #11460

Open thebjorn opened 2 weeks ago

thebjorn commented 2 weeks ago

Describe the bug

If you create an element, e.g. as the handle for resizing a SplitPanel component and give it a sensible aria role ("separator"), you get a warning. This should no longer give a warning: https://github.com/w3c/html-aria/issues/488

Reproduction

<button type="button" role="separator">...</button

You get a warning similar to this:

docsite:dev: 12:19:58 PM [vite-plugin-svelte] C:/srv/lib/tilly/packages/grogui/src/lib/components/splitpanel/SplitPanel.svelte:119:4 <button> cannot have role 'separator'

REPL

Logs

docsite:dev: 12:19:58 PM [vite-plugin-svelte] C:/srv/lib/tilly/packages/grogui/src/lib/components/splitpanel/SplitPanel.svelte:119:4 <button> cannot have role 'separator'

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (48) x64 AMD Ryzen Threadripper 3960X 24-Core Processor
    Memory: 31.56 GB / 63.88 GB
  Binaries:
    Node: 21.5.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 8.5.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.0.6 - ~\AppData\Local\pnpm\pnpm.CMD
  Browsers:
    Edge: Chromium (122.0.2365.92)
    Internet Explorer: 11.0.22621.1

Severity

annoyance