Skip to content

Commit

Permalink
test: Add simple test for button roles
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Dec 13, 2024
1 parent 9d1c845 commit d707458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/ts/dom-attributes-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ function createSignal<T>(value: T): JSX.SignalLike<T> {
};
}

// @ts-expect-error A button should not have a role of presentation
const badAriaRole = <button role="presentation" />;
const validAriaRole = <button role="slider" />;

// @ts-expect-error We should correctly type aria attributes like autocomplete
const badAriaValues = <div aria-autocomplete="bad-value" />;
const validAriaValues = <div aria-autocomplete="none" />;
Expand Down

0 comments on commit d707458

Please sign in to comment.