Skip to content

Commit 9f2cb57

Browse files
committed
test: Add simple test for button roles
1 parent 3d0b92a commit 9f2cb57

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/ts/dom-attributes-test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ function createSignal<T>(value: T): JSX.SignalLike<T> {
1212
};
1313
}
1414

15+
// @ts-expect-error A button should not have a role of presentation
16+
const badAriaRole = <button role="presentation" />;
17+
const validAriaRole = <button role="slider" />;
18+
1519
// @ts-expect-error We should correctly type aria attributes like autocomplete
1620
const badAriaValues = <div aria-autocomplete="bad-value" />;
1721
const validAriaValues = <div aria-autocomplete="none" />;

0 commit comments

Comments
 (0)