Skip to content

Commit df1f20d

Browse files
authored
refactor: Remove generic aria role from types (#4610)
1 parent 055cc5b commit df1f20d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/jsx.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,6 @@ export namespace JSXInternal {
10961096
| 'feed'
10971097
| 'figure'
10981098
| 'form'
1099-
| 'generic'
11001099
| 'grid'
11011100
| 'gridcell'
11021101
| 'group'

test/ts/dom-attributes-test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ const signalValidAriaValues2 = (
3434
);
3535

3636
const validRole = <div role="button" />;
37+
// @ts-expect-error We should correctly type aria roles
38+
const invalidRole = <div role="invalid-role" />;
39+
// @ts-expect-error We should disallow `generic` as it should not ever be explicitly set
40+
const invalidRole2 = <div role="generic" />;
3741
const fallbackRole = <div role="none presentation" />;
3842

3943
const booleanishTest = (

0 commit comments

Comments
 (0)